Constant speed when defining the iTween path

I designed a curved path as shown in the image below. enter image description here

The cube navigates the path from the left side to the right side of the scene along this line of code:

iTween.MoveTo(gameObject,iTween.Hash("oncomplete","destroying","orienttopath", true, "path",path,"time",1.6,"easetype",iTween.EaseType.linear,"movetopath",false));

      

the EaseType parameter was chosen to be linear and I expect you to travel the path at a constant speed, however the speed decreases when the cube is in a curved path (top left to middle) and then it accelerates and catches up along the straight path.

I would like to know how to determine the constant speed for the entire path.

thank

+3


source to share


2 answers


iTween will take the same time from node 1 to node 2 as it will take from node 2 to node 3. Since your first 2 nodes are close together, it will be slow here and speed up towards the third.



If you get a more even spacing between your nodes, you get a smoother path using linear easetype method

+2


source


Not so much an answer as more comments about my research on this issue. It seems that PixelPlacement has been promised a fix for at least 3 years , but nothing is expected. People have to work around this. I found a reasonable example here .



annoying. But it's free. Although I did pay for the examples, which ended up being very cheap, but still a little disappointing as I was hoping this would be considered given the amount of chatter on the internet about it!

0


source







All Articles