- Home /
Default positions
Just out of curiosity really, where is the default 0,0,0 position? Is it to where the gameobject is? In the gamespace? and if i have a child object set to a parent object, is that childs 0,0,0 position set to the parents position? Or in the gamespace?
Answer by Meltdown · May 25, 2011 at 09:13 AM
The default 0,0,0 position is set in what is known as 'world space'. So if you add an object, at 0,0,0, you can say its position is in 0,0,0 in world space.
If you move it to 5,5,5 in world space, and then add a child object to it, the child's local position will be its offset to the position of the parent.
ok so say for example, my 'player' is at 10,10,0, and i spawn an object from that players position and it is 'firing' towards 10,50,0, would the default 0,0,0 of that firing object be where the player is?
If its a child of the parent, then its local position would be (0,0,0). However, in world space it would be (10,10,0).
ok cool, i think i understand it more now, just going to put it into practise :) thank you both
Answer by Ejlersen · May 25, 2011 at 09:10 AM
Depends.
A game object can have a world position and a local position.
The local position depends on its parent, so if it has a local position of (10,0,0) and the parent has a world position at (0,5,0), then the child would have a world position at (10,5,0).
Your answer
Follow this Question
Related Questions
Proper way to center a game object into an UI image? 1 Answer
Different unit size on mobile and PC 1 Answer
Seemingly random bug when positioning player on scene start 0 Answers
Combine Meshes Problem 2 Answers
EZ still isn't positioning right 1 Answer