how to make the character jump at the same height and distance but at different speed

Hi,

I’m using object:applyLinearImpulse to make my character jump. The jumping height and distance are ok to me but I want it to jump/move faster. If I change the xForce or yForce, it may jump higher or further. How can I increase the jumping speed without affecting the jumping heigh and distance?

Thanks.

Regards,

Lin

Is there a way to do this with physics or something else like transition/math?

Thanks.

Lin

If you increase the jump force, you’ll need to change the gravity.  

Alternately, you might play with this: http://docs.coronalabs.com/daily/api/library/physics/setTimeStep.html  (no guarantees it will do what you need though.)

In truth, figuring this out by tweaking physics may be extremely hard and time consuming.  You might be better off breaking this down into the vertical component and horizontal component.  Then write a piece of code to calculate each part of the movement.

(Thanks for asking this, it is a very interesting question.)

One more thing.  We had a discussion of forces on Corona Geek Hangout #81 and I made a code kit for demoing and testing settings.

If you run it, use an iPad view (in simulator) to see the whole screen.

Hi,

Thank you for your suggestion. Playing around gravity and setTimeStep() can improve the jumping speed and look more real but changing the speed while keeping the height and distance the same is still a problem to solve.

Thanks.

Lin

Is there a way to do this with physics or something else like transition/math?

Thanks.

Lin

If you increase the jump force, you’ll need to change the gravity.  

Alternately, you might play with this: http://docs.coronalabs.com/daily/api/library/physics/setTimeStep.html  (no guarantees it will do what you need though.)

In truth, figuring this out by tweaking physics may be extremely hard and time consuming.  You might be better off breaking this down into the vertical component and horizontal component.  Then write a piece of code to calculate each part of the movement.

(Thanks for asking this, it is a very interesting question.)

One more thing.  We had a discussion of forces on Corona Geek Hangout #81 and I made a code kit for demoing and testing settings.

If you run it, use an iPad view (in simulator) to see the whole screen.

Hi,

Thank you for your suggestion. Playing around gravity and setTimeStep() can improve the jumping speed and look more real but changing the speed while keeping the height and distance the same is still a problem to solve.

Thanks.

Lin