Need help on maintaining momentum of player..

bladeolsonbladeolson Member Posts: 295
edited November -1 in Working with GS (Mac)
I was wondering if anyone had any ideas on how I can maintain the momentum of a player after he jumps. Even if the player lets go of the L or R button. Somehow I want to figure out how fast the player is moving, store it, and the keep that speed and direction until he lands. regardless of if the player presses any keys or not.

How would I "store" the momentum? I tried to use the velocity but it seems to not keep while in the air. He just drops after letting go of L or R keys.....

thanks

blade

Comments

  • KamazarKamazar Member Posts: 287
    You using "move" or "accelerate"? "Accelerate" should keep the momentum going.
  • bladeolsonbladeolson Member Posts: 295
    I am actually using a change to the x velocity. I have it give 350 velocity when going left or right. So you think I should try using Accelerate? The problem I had with that is that when the player lands, he is still moving even if nothing is pressed. I want the momentum to keep in the air, but lose the speed quickly when landing. Probably not completely though as it is natural to have momentum even when on the ground just less. I will try again.
  • bladeolsonbladeolson Member Posts: 295
    Kamazar:

    After much tinkering and losing more hair, I think I FINALLY got the movement I want. It looks really awesome. Feeling closer and closer to a mario style jump! Momentum is carried into the air and there is a slight momentum on the ground when landing.
  • KamazarKamazar Member Posts: 287
    ... the drag behavior, have you tried that out, by any chance? Probably irrelevant by now, but handy for future reference.
Sign In or Register to comment.