johnatm / itween

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

GenerateMoveToPathTargets + "speed" argument issue #75

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a path with 2 nodes
2. If path length is known that helps (say 100 meters)
3. supply a speed argument of 10

What is the expected output? What do you see instead?
The update should complete in 10 seconds given a path length of 100. Instead 
it's 3 times slower. This is due to this code:

        //need for speed?
        if(tweenArguments.Contains("speed")){
            float distance = PathLength(vector3s);
            time = distance/(float)tweenArguments["speed"];
        }

suppliedPath should be used instead of vector3s so that start and end control 
points are not included i the length calculation

What version of the product are you using? On what operating system?
Version: 2.0.44 on Mac OS

Original issue reported on code.google.com by nkou...@gmail.com on 6 Jul 2011 at 11:54

GoogleCodeExporter commented 8 years ago
Actually it looks like suppliedPath will not do as it does not account for 
plotStart set to true, so you could either create a new array to hold that as 
well or pass offset and length arguments to PathLength to skip the start/end 
nodes

Nick

Original comment by nkou...@gmail.com on 7 Jul 2011 at 12:11