bernie-g / geckolib

GeckoLib is an animation engine for Minecraft mods, with support for complex 3D keyframe-based animations, numerous easings, concurrent animation support, sound and particle keyframes, event keyframes, math-based animations, and more. Available for all major modloaders.
https://geckolib.com
MIT License
596 stars 126 forks source link

[Suggestion] Add markers on animations #619

Closed iglee42 closed 3 weeks ago

iglee42 commented 3 weeks ago

It could be could to add the fact that developper can add markers on animations to follow a point on the model.

The markers could be read in the code.

It can be useful to make an item renderer follow a point on the model when an animation is playing

Tslat commented 3 weeks ago

How would this work?

iglee42 commented 3 weeks ago

You could add markers with a name and a position like bones in the animation file, and with the AnimationState you could do state.getMarkerPos(Name); and it returns the position of the Marker at the current frame of the animation

Tslat commented 3 weeks ago

What's to stop you from doing that already with bones?

iglee42 commented 3 weeks ago

I don't find how to get bones position in the code

Tslat commented 3 weeks ago

Look at the getWorldSpacePosition and similar methods in GeoBone