Search Unity

iTween use local coordinates

Discussion in 'Scripting' started by Krodil, Mar 9, 2011.

  1. Krodil

    Krodil

    Joined:
    Jun 30, 2010
    Posts:
    141
    Hi,
    I am trying to instantiate a prefab from another obj. This instantiation needs to be relative to the parent, hence I need to use local parameters instead of Global. I dont get any errors, but the object is placed, in case below, at pos.x 10 instead of pos.obj.10

    Code (csharp):
    1.  
    2. iTween.MoveTo(gameObject, {"x":10,"time":1,"isLocal":true});