- Home /
The question is answered, right answer was accepted
GameObject and Camera
How cam I make a gameobject inside a camera stay always in the same position when the camera moves.
Please someone answer.
"Please someone answer." Ok, we did. Now, please respond lol.
Answer by clunk47 · Aug 12, 2013 at 04:24 AM
You can parent in the Hierarchy, or you could have a look at transform.parent. To match positions, you could just use something like:
transform.position = Camera.main.transform.position;
Then parent:
transform.parent = Camera.main.transform;
Answer by cmpgk1024 · Aug 11, 2013 at 08:19 PM
You can drag a GameObject onto another GameObject in the Object Hierarchy tab to make it a child object.
$$anonymous$$ake sure they are both at the some position before you drag and drop.
I don't think he needs the two to be at the same position, but rather that the object is always at the same position in the viewport. So no need to change the position to 0,0,0.
Follow this Question
Related Questions
My text don't appear in Game Window, help 1 Answer
Google VR not working with two cameras 0 Answers
OpenCV and Android with Unity3D 1 Answer
Disabling all Cameras Android/Iphone 1 Answer
AssetBundle loading model is not showing in mobile 0 Answers