Stop moving after jump

Guys i have the following global attributes in my game:

btnjump
btnright
btnleft

I have the following rule, in my main character:
If btnjump is true, btnright is true and btnleft is false:

Change: linear.velocity.y to 400 and linear.velocity.x to 300

The actor succesfully jump to the right, the problem is, after he jumps, the linear.velocity.x doesnot stop, how could i fix that?

Comments

  • adlaimadlaim Member Posts: 68
    edited May 2013
    Try this :
    For 0.5 sec /
    Linear.velocity.x to 300
  • natzuurnatzuur Member Posts: 304
    Try using drag, you'll want to increase it quite a bit to see a noticable effect.
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    You could also watch for when the actor re-collides with the ground, and when it does set it's linear.velocity.x to 0.
Sign In or Register to comment.