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).
asked Jun 10 '11 at 05:39 AM
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.
answered Jun 10 '11 at 07:22 AM