Hi,
We have been trying since 6 days to solve this problem.
On the image you can see a car and a way. We want, that the car (sprite) follows (or moves on) this way (path) with autoRotate and constant speed.
We made this “way” with inkscape. We can save the “way” as .svg to get the path.
The car should follow the path and changing his direction with constant speed.
http://img43.imageshack.us/img43/9229/text4621.png
for example the .svg file:
...
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 196.47467,414.45085 ... etc."
id="path2985"
inkscape:connector-curvature="0" />
...
The SVG path file is not important. We can also write our own path array.
We thought, that Path moving is so important for game developers. And we never thought, that this takes 6 days
at the beginning.
We can’t find any good examples or tutorials.
Yes, it’s true. We asked this question in another forum. But after 6 days, we need now a solution.
This is the forum where we asked the question:
http://badlogicgames.com/forum/viewtopic.php?f=11&t=7510&sid=de880d0aeef7c7237ea3e1e496cd2842
We heard about tween engine by greensocket. There is a animation on the website. It’s called “bezier example” and it’s in the
TweenLite/Max Plugin Explorer.
http://www.greensock.com/v12/
We first thought. Great, but it’s only for Flash and Javascript. We first thought to the change the JS code to java, but the
code is too much.
We are grateful for any help.
Thanks…