Mathf.SmoothStep not quite working.

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;
		
		}	
	
	
	}
	
}

}`

For my other scripts to work i need the player to be at an exact int.

Important point: Unity does not represent position with integers. Like most modern game engines, it uses floating point numbers – and those numbers have limited precision.

If you expect exact equality between floats, you’re probably going to run into trouble. Most people get into the habit of instead checking for floats which are “approximately equal”. You can use Unity’s Mathf.Approximate() helper function, or write your own.

Consider: if we assume that one Unity unit is one meter, your character is at most ten nanometers away from the position you’re expecting. Is that really something you need to worry about?