-
Notifications
You must be signed in to change notification settings - Fork 95
Animation in Minecraft
First, we need to look at an interesting property: alpha value
This shows how transparent our animation is.
0 means the animation is disabled, and 1 means anything behind our animation is disabled.
While the animation is happening, we want to completely overwrite Minecraft's built-in animation engine, but just before our animation ends, we want to go back to the default pose.
- Let t=0 be when the animation starts.
- Begin: The animation starts at this time.
- End: The animation ends.
- Stop: The player is in the default position, modifying the player's pose is no longer needed.
By default, the alpha value looks like this (0:start, 5:begin
, 35:end
, 40:stop
):
Until the end time, the player will move to the default position if the animation does not explicitly state the position.
Normally the animation frames are between the begin
and the end
.
You can put keyframes after the end
or before the begin
. If you do, for the used property the end
or the begin
will shift to your keyframe, making your keyframe to be the real first or last keyframe of the animation.
It is advised to set the end
to the last keyframe in your animation.
Without setting the default pose between the beginning and the end, an animation not defining every property could behave unexpectedly.