Varied Jump Power Using Physics?

0 favourites
  • 3 posts
From the Asset Store
75 power-up sound effects; bonus and notification sounds, fanfares, harp glissandi, stabs, clock ticks, etc.
  • Hey guys, I was a bit stumped on this one and was hoping someone might be able to help me out.

    I'm aware of how to allow the player to jump at varying heights using the platform behavior, but what about when using the physics behavior only? Platform has the ever useful Vector Y expression which would normally allow me to do this, but I can't seem to find an alternative for Physics.

    So, in short, if I wanted the power of the player's jump to be based on how long they hold down the jump key, how would I go about doing that using the Physics Behavior?

    I would appreciate any ideas or help with this!

  • The physics behavior provide you with the action "Apply force", that let you specify a force on X and Y applied to your object. If you apply this force on Y while the jump button is down, you should have some kind of rocket jump style. Just add a time limit, or a weakening in the force as the jump is hold longer, so you can control the maximum jump height.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I was thinking that when a key is pressed then store the time (wallclock) when this key is released take this stored time from the released time to get the time key was held. Use this "Time the key was held down" to power the jump....

    <img src="https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/Ashampoo_Snap_2014.02.19_08h16m22s_001.png" border="0">

    capx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)