3

I've designed a curved path like the below figure. enter image description here

The cube move along the path from the left side to the right side of scene by 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 is was selected linear and I expect to path the path with a constant velocity, however the speed is reduced when the cube is in the curved path (left side before the midpoint) and then in a straight path it accelerates and catches it up.

I would like to know how can I define a constant speed for entire path.

Thanks

user1021110
  • 213
  • 1
  • 6
  • 13

2 Answers2

2

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

If you get a more uniform distance between your nodes you'll experience a smoother path using linear easetype

Rune Vejen Petersen
  • 3,201
  • 2
  • 30
  • 46
  • 2
    Is there any way to use iTween in a way where it ignored node distances and just uses the overall path length? – John B Jan 13 '15 at 19:08
0

Not so much an answer, but more of a comment on my research into this issue. It seems the PixelPlacement guy has been promising a fix for at least 3 years now, but nothing is forthcoming. People are having to work around it. I found a reasonable example here.

Annoying. But it is free. Although I did pay for the examples, which is ultimately very cheap, but still a little frustrating as I'd hoped this would be addressed given the amount of chatter on the internet about it!