I’ve seen the tutorial on Animation, which is triggering animations from imported models, however I’m looking to animate the translation of a node - so that a node can move from (0, 0, 0) to (1, 0, 1) smoothly. Eventually I’ll be looking at the same thing for rotation.
Are there are any guides/tutorials on how best to do this with JME? Or is this just something I should implement however best suits my use case?
Exactly like that! I didn’t spot that - I’ll have a play around, thanks!
I was just looking at the test and have a question; how do motion events tie in with the update loop, or do they keep track of time themselves internally? In that test it doesn’t seem that the motion control is registered with anything that could tie it in with the update loop, but I suspect I’m missing something?
…and my guess is it self-registers itself with the spatial in the constructor but you could look at the code if you really wanted to know. It’s only two or three clicks away from here.
So yeah, it does (it calls spatial.addControl(this)) - which makes a lot of sense. My brain chews on these things if I can’t build a mental map of how they work, stops me getting anything done Thanks, much appreciated!
MotionEvent can be used as a control on a spatial or as a cinematic event with a Cinematic.
You can also use spatial Animation for your purpose, look at the AnimationFactory class it provides convenient api to create a spatial animation for an object.