Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Parent to camera?

Discussion in 'Scripting' started by robertseadog, Aug 19, 2005.

  1. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
    How can I parent something to a Camera?
    Heres my script and it's not working..

    Code (csharp):
    1. var Mycamera : Camera;
    2. function Update () {
    3. transform.parent = Mycamera.transform.position;
    4. }
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,882
    transform.parent = Mycamera.transform;
     
  3. robertseadog

    robertseadog

    Joined:
    Jul 23, 2005
    Posts:
    374
    Thanks! I hate little mistakes like that..
     
unityunity