Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

weird behavior setting a vector to localPosition

Discussion in 'Scripting' started by Quadgnim, Dec 9, 2013.

  1. Quadgnim

    Quadgnim

    Joined:
    Sep 10, 2012
    Posts:
    132
    Hey all, I'm using Free Unity 4.3

    I have a c# script setting

    Vector3 startingPos = transform.localPosition;



    seems straight forward, but it's actually setting the startingPos to world space, not local space. I don't want to save off world space, I need local space.

    Any suggestions on what I'm doing wrong?

    Thanks.
     
  2. Quadgnim

    Quadgnim

    Joined:
    Sep 10, 2012
    Posts:
    132
    never mind. Codes was out of sync between MonoDevelop and Debug