swynn
1
I have a model at position: -2.130466, -0.9984617, 1.754745
if I change z to: 1.444349…the object moves only slightly.
But if i put this into iTween MoveTo…it moves a great deal further (not sure where it ended up)
Why? iTween must base the Z location on some other position?
Example of my iTween code:
iTween.MoveTo(GameObject.Find("nameofobject"),iTween.Hash("x", -2.130466, "y", -0.9984617, "z", 1.444349, "time", 15));
2 Answers
2
swynn
3
iTween inherits information from parent by default.
Adding “islocal” fixed the problem
My new line looks like this:
iTween.MoveTo(GameObject.Find("nameofobject"),iTween.Hash("z", 1.440323, "islocal", true, "time", 5));
swynn
2
It has a parent object, that was made by another artist.
You put me on the right path…I added “islocal” and everything is working fine now. Thanks!
New line is:
iTween.MoveTo(GameObject.Find(“nameofobject”),iTween.Hash(“z”, 1.440323, “islocal”, true, “time”, 5));
if the parent object is scaled, changing position in the inspector can behave in unintuitive ways.
– Loius