I want to move an rigidbody non-kinematic by applying a force but I want to have a constant velocity. By adding a force in FixedUpdate() each time is called, will increase the object velocity. I could check the object velocity and if is less or bigger then the one I want I could updated with the value I want… but this is not a good approach according by unity documentation:
So i need guidance to understand how to move an object with constant speed by applying a force!
From unity documentation if you have a rigidbody non kinematic you should modify the position only by applying a force.
Opposite force? What magnitude?.. how can I create a system with force and opposite force which will keep the velocity constant?
You can try increasing the drag to a value that will keep the velocity constant. Try adding a force until it accelerates to the desired velocity, then stop applying that force and turn off drag.
you can use velocity if its easier… sure it can produce unrealistic results, but depending on your needs that might not matter.
they say that because overriding the velocity value means you negate gravity and collision forces. MovePosition is a nice way to move a rigidbody with good accuracy, especially if you have a target velocity
MovePosition is the easiest way to control the object but velocity is another good approach. My bad that I was looking to find a solution to avoid using something else then force.
How the usage of move position and velocity on non kinematic will affect the GPU on iOS devices?