void Update()
{
if(PlayerHasEntered)
{
transform.position = Vector3.MoveTowards(transform.position,
new Vector3(transform.position.x ))
}
}
I need tp move the transform from it’s current position to this position : X = 9.83 , Y = 2.37, Z = -6.44
If I’m using MoveTowards how do I assign the new position ?
Should I add or remove the values from the current x,y,z or just make new Vector3(9.83f,2.37f,-6.44f) ?
Like this :
transform.position = Vector3.MoveTowards(transform.position,
new Vector3(9.83f, 2.37f, -6.44f), Time.deltaTime *1f);