- Изменено
Raptor Jump/walk pivot point adjusting
I am new to Spine and playing around with the examples for libGDX runtime.
The question is how to handle different pivot points (I hope this is how they are called).
A) The raptor's "walk" animation is created by being on the same pivot point.
B) The raptor's "Jump" animation moves from left to right.
So I can make the raptor walk from left to right by updating position with each frame like this:
x++;
skeleton.setPosition(x, 20);
How do I keep the raptor's jump at the same spot. I want to the raptor to jump and land at the same spot. Not jump from left to right.
What is the best approach for this? Create the jump animation like the walk animation in editor? Can I change it by using a certain parameter/method/data of the runtime?
This is something you want to do in the editor. The current raptor jump animation is something called a root motion (the "pivot" or root position is moved in the animation). Check out the Spineboy example, it has a jump animation that is fixed on the x-axis.
Thanks got it.