I’m working on a script that smoothly moves my character (that has a rigid body) to a selected position. But i need that character to be exactly on the position for example: 1, 0, 1. But my script doesn’t do that. Instead it moves him to 1, 0, 0.99999999. I think that it doesn’t work because it’s a rigid body and reacts with the terrain and moves it a tiny bit. For my other scripts to work i need the player to be at an exact int. I looked into some Mathf functions but none of them worked. Here’s my script: `function FixedUpdate () {
if (turnCompleting){
if (NextTurnMove){
//while (!transform.position.x == nextMovingPosition.x && !transform.position.z == nextMovingPosition.z){
rigidbody.position.x = Mathf.SmoothStep(curTransform.position.x, nextMovingPosition.x, .3);
rigidbody.position.z = Mathf.SmoothStep(curTransform.position.z, nextMovingPosition.z, .3);
//rigidbody.MovePosition(Vector3.Slerp(curTransform.position, nextMovingPosition, .3));
//}
if (curTransform.position.x == nextMovingPosition.x && curTransform.position.z == nextMovingPosition.z){
turnCompleting = false;
}
}
}
}`