- Home /
How to make an object moving in a certain direction, move in specific steps like 0.1f
I was my object to move with a Vector3.right velocity, but moves like 0.0f 0.1f 0.2f 0.3f and on the same time, I want it still be able to check for collisions, as it ignores them if I moved the object manually with transform.position = x;
Answer by theLucre · Dec 09, 2014 at 02:30 AM
Consider using ForceMode.Acceleration to control your movement. Also multiply by Time.deltaTime for more precision.
rigidbody.AddForce(Vector3.right * Time.deltaTime * SomeSpeed, ForceMode.Acceleration);
http://docs.unity3d.com/ScriptReference/ForceMode.Acceleration.html
Your answer
Follow this Question
Related Questions
Stop A player Turning at Specific Point. 1 Answer
How to make a gamebject wiggle slowly as it moves forward ? 1 Answer
Restrict a Players Movement Up a Slope 1 Answer
Velocity powered rigidbody on a moving platform without parenting. 3 Answers
how to have a fixed movement using rigidbodies without animations 0 Answers