Hello, Im trying to move an object to a certain posistion as I have here
objectToMove.transform.position = new Vector3(-75, 6, -13);
And I encounterd a problem, the object moves instantly to that position as I want it to move slowly to that position (Like a space door thats sliding to the side)
I’m using a GUI button to move the door incase that matters.
Note that Vector3.MoveTowards returns a Vector3 that is ‘speed’ closer to the targetPosition. This means that you can check its value and only change the position of the Transform if it is not equal to. For further reference, see the Unity docs: