How do I set and get the position of a object in vector 3 form?
Edit: I am using C#
How do I set and get the position of a object in vector 3 form?
Edit: I am using C#
Assuming you’re using C#…
transform.position = new Vector3(10, 20, 30);
Getting the position is just accessing transform.position
.
Vector3 p = transform.position;
Relevant documentation:
float x = transform.position.x;
Thanks so much but how can I get the position in (x, y, z)