How to transform world position to local position in unity 3d for itween

Pawan Chaurasiya picture Pawan Chaurasiya · Jun 5, 2014 · Viewed 8.8k times · Source

I am struggling in problem that convert world position in local position. i am using iTween plugin in unity. And there is an argument of position in iTween which is take world position and but i want to use local position in pixel to move the object in iTween. I tried with transform.TransformPoint(new Vector3(0,0,0) i don't thing it is working according to pixel position.

like this example:

iTween.MoveTo(gameObject,iTween.Hash("position",new Vector(0,0,0) , "time" ,.6, "easetype" ,"easeincubic"));

the argument of position iTween take in World position but i want to convert in pixel position. Like i pass new Vector(450,50,0);

your help will be appreciated.

Answer

Pawan Chaurasiya picture Pawan Chaurasiya · Jun 9, 2014

remember to add: "islocal", true parameter in iTween.Hash