I have a jet-pack of sorts. It uses, without gravity, positive and negative “Force” to move the character up/down. However, Force is cumulative so over time they increase speed.
Is it possible to limit the speed without decreasing the force? I don’t know how (I’m sure it’s possible) to do the math to dynamically change force based on speed, but it seems easier to simply “cap” the speed, even if force is trying to push faster.
(I realize I can do this with simply using transform.position.y based on the amount the player is pushing up/down on the joystick, but the fluid feeling of using force is much more exciting)
The code I use: (moveY is between -100 and 100, depending on the joystick position)
rigidbody.AddForce (0, (moveY * 4), 0);