Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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;
    }
}
 
PREVIOUS NEXT
Tagged: #change #axis #variable
ADD COMMENT
Topic
Name
5+6 =