hi, i am making a game about a plane and my problem is that the plane must come back to initial pozition after i move it, for example i press “a” to move to the left i want that after i do not press more the key, the plane comes to initial pozition(x=0, y=0, z=0)( the plane have to go straight ahead after i don’t press more the key)
Can you try this code
public float thrust;
void Update()
{
if(Input.GetKey(KeyCode.A))
{
transform.position = new Vector3.left(thrust*time.DeltaTime);
if(Input.GetKeyUp(KeyCode.A))
{
transform.position(0,0,0);
}
}
}
Dont forget to edit “{}” these codes