johnatm / itween

Automatically exported from code.google.com/p/itween
1 stars 2 forks source link

MoveToPath Issue #64

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using "isLocal" and "movetopath" on parented GameObject
2.
3.

What is the expected output? What do you see instead?
The GenerateMoveToPathTargets method ignores localPosition only uses
WorldPosition.

What version of the product are you using? On what operating system?
Newest! :D

Please provide any additional information below.
Fixed That Issue by adding following in GenerateMoveToPathTargets()

                bool isLocal;

        if(tweenArguments.Contains("islocal")){
            isLocal = (bool)tweenArguments["islocal"];
        }else{
            isLocal = Defaults.isLocal; 
        }

        Vector3 bug;
        if (isLocal) {
            bug = transform.localPosition;
        } else {
            bug = transform.position;
        }
And Replacing all "transform.position with "bug" ;)

Original issue reported on code.google.com by oliver.k...@gmail.com on 17 Apr 2011 at 12:47

GoogleCodeExporter commented 8 years ago
I have also had this issue. I'm trying to make a bot fly a circle around a 
parent and it seems that iTween is inserting the world position into the path 
even though isLocal is set. This happens in the GenerateMoveToPathTargets() 
method as shown by the original poster. Please fix. 

Original comment by Cory.Le...@gmail.com on 20 Oct 2012 at 3:59