|
Hello, I am coding a rigid body based enemy but it moves by applying forces and I wanted to make it run in a fixed velocity, is that a way to do it? move it without apply forces and make it still collide just like character controller? (I dont wanna use character controller). Thanks!
(comments are locked)
|
|
To move at a constant velocity, add the force of desiredDirection * (topSpeed - velocity.magnitude). If you want to accelerate to a top speed, clamp that multiplied value to an Acceleration value. Also, look up various ForceModes to determine which one is right for you.
(comments are locked)
|
