Hi guys,
i am started working with jmonkey and i want to create a little strategy game.
Therefore I need to select an unit and give it a job i.e. go to these point or attack these target or something like this
I created a little scene with a ninja and a black box. I can select the ninja (may you see the redpoint behind the mouse^^) and i can give this mesh a target . So i want to tell the mesh go to the target. But I don’t know how to handel that. Thinks like move dont work for me, cause i want teleport my units. All in all i have both points, but i have to know how to move my mesh step by step
http://www0.xup.in/exec/ximg.php?fid=11781097
I looked for samples or codes which handle my problem, but i didnt found somethin like that.
Hope you are able to help me
please excuse my fuc*ing bad english
so far…
Dominique
Interpolation is the keyword you are searching for i guess.
Cinematic’s may be useful, but I’ve never used them so I can’t say exactly, but as @Kurosei said, this can be accomplished using [java]Vector3f intermediateLocation = FastMath.interpolateLinear(Vector3f start, Vector3f end, float amount);[/java] and then increase the amount over time from, 0 → 1, in an update(float tpf). The interpolate function is mentioned somewhere in the slide show:
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:math_for_dummies
Thank you for your fast reply
i will test
EDIT: Hell yeah i works great !