Physics object maintaining speed

I have a physics object that I want to keep moving forward when I press the “A” key. I made an event that adds a force of 20 when A is pressed.When I hold the A key, the physics object keeps on adding speed instead of just going at the same speed. How can I make it so that the object keeps going forward at the same speed

set the force to 20 instead of adding a force of 20.

1 Like

these are the only force options, i don’t see where to set a constant force

image

Ah okay.
Use “force” instead of “impulse” if you want to hold the key.
If you want to limit the maximum speed of the object, adjust the “Linear damping” Physics setting.

1 Like

gotcha, that sounds about right. i’ll check it out, thanks for the help.

hi, sorry for the late reply.
linear damping seems to work a little bit, but i’m not sure how it works exactly. i understand that it limits an object’s speed, but it doesn’t seem to stop my character from flying off. how much damping should i use (i’m adding a force of 100 on key-press).
also, is it still possible to get the character to move at a constant speed?

Linear damping doesn’t really limit the speed, it slows down the object’s speed.
If your character flys off, you’re giving it too much force/impulse. If you shoot a bullet in water, it will slow down quick, but it will still exit the gun fast.

I can’t give you the numbers you need, because they depend on your world and your objects. Maybe you should read the Physics wiki page to better understand how it works.

1 Like

thanks for the help :slight_smile: i’ll check out the wiki as well