• Create Account

Need scary sound effects or creepy audio loops for your next horror-themed game? Check out Highscore Vol.3 - The Horror Edition in our marketplace. 50 sounds and 10 loops for only \$9.99!

### #Actualnoodlyappendage

Posted 11 March 2012 - 12:35 AM

I'm sure this will probably be something basic but I'm having some trouble figuring this one out. So I'm working on a relatively simple 2D platformer motion system. If I want to move an object I call an applyForce(f) function and give it a force vector. The problem I have is if, for example, the player is running, I want a maximum velocity so they don't turn into The Flash. But if I want to then apply another force to simulate a strong gust of wind, it should push the player to a faster rate than he can normally run, exceeding the maximum velocity. I've thought about assigning a max velocity property to each force, but after I take the wind gust force away, they should still have a momentum exceeding the normal maximum 'running' velocity, until friction brings them back down to normal speed.

### #1noodlyappendage

Posted 11 March 2012 - 12:34 AM

I'm sure this will probably be something basic but I'm having some trouble figuring this one out. So I'm working on a relatively simple 2D platformer motion system. If I want to move an object I call an applyForce(f) function and give it a force vector. The problem I have is if, for example, the player is running to the right, I want a maximum velocity so they don't turn into The Flash. But if I want to then apply another force to simulate a strong gust of wind, it should push the player to a faster rate than he can normally run, exceeding the maximum velocity. I've thought about assigning a max velocity property to each force, but after I take the wind gust force away, they should still have a momentum exceeding the normal maximum 'running' velocity, until friction brings them back down to normal speed.

PARTNERS