Answers for "how to change the axis of a Vector3 variable"

C#
1

how to change the axis of a Vector3 variable

Vector3 playerPosition = new Vector3(0, 0, 0); 

void Update()
{
	Input.Getkey("w")
    {
		playerPosition = transform.position;
		playerPosition.x -= 1f;
		transform.position = playerPosition;
    }
}
Posted by: Guest on August-22-2020

Code answers related to "how to change the axis of a Vector3 variable"

C# Answers by Framework

Browse Popular Code Answers by Language