- Home /
Question by
546a1 · Mar 29, 2015 at 04:58 PM ·
vector3translatecoordinates
How do I set an object's coordinates in scripts?
That was a little bit inspecific. Here's the details.
So basically, I want to set the position of an object. The transform.Translate (x, y, z)
moves the object relative to where it currently is, whereas I just want to put the object in a space, not move it. Any help?
Comment
Best Answer
Answer by Tehnique · Mar 29, 2015 at 04:59 PM
You can use "Transform.position". Like this:
yourTransform.position = new Vector3(x,y,z);
You have to assign the entire vector, you cannot set just x, y or z.