You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the setup: a Skeletal Mesh with Animations, thus having an Inherited AnimationPlayer, and then you create another AnimationPlayer, with tracks that play animations from the inherited AnimationPlayer and/or additional custom tracks, such as CallMethod tracks.
Then if you call the animations from the custom AnimationPlayer with a State Machine AnimationTree, the AnimationTree does not interpolate the transitions between the animations correctly, creating either "stuck" frames or freezing the 1st animation before transitioning to the next one.
If you play animations from the inherited AnimationPlayer (the animations from the mesh, with nothing else), then the AnimationTree correctly transitions.
My current example
This machine has a "TurnOn" and a "Loop" animation, imported from Blender.
By adding the TurnOn animation to a custom AnimationPlayer, when transitioning to the Loop animation, something very strange happens with the engine (the gray one) which it gets stuck down ("crying engine") and then the looping animation does not play.
In the video, after showing the "crying engine", I show the loop animation which was supposed to play.
It can be hard to reproduce this, so my reproducible project mimics the issue using the same scenario (an engine with TurnOn and Loop animations).
MoendaDiesSad.mp4
Steps to reproduce
Import a skeletal mesh with at least two animations
Created an Inherited Scene from the Mesh
Add a script to the inherited scene and add any method for it
Add an AnimationTree and an AnimationPlayer
Create two animations in the AnimationPlayer
Animation 1 (ex: "TurnOn)":
Add an AnimationPlayback Track, and insert a key playing an animation from the inherited AnimationPlayer
Add a CallMethod track and call the method you added to the scene before
Animation 2 (ex: "Loop)":
Add an AnimationPlayback Track, and insert a key playing the other animation from the inherited AnimationPlayer
AnimationTree:
Add a State Machine as the root
Select the custom AnimationPlayer as the Anim Player param
Add a state for each one for the animations, being the animation with CallMethod the 1st one and then an At End, Auto Advance transition that transitions to the other one
Test:
If you test, the 1st animation "TurnOn":
Won't play
or will get stuck
or will cause bad interpolation to the next animation.
But if you manually play the custom "TurnOn" animation added before, it plays correctly. Then in the AnimationTree, it doesn't.
AnimationPlayerOriginal.tscn (red machine): the Inherited scene from the MachineMock.glb mesh, with an AnimationTree, using the original AnimationPlayer. This scene works correctly.
AnimationPlayerCustom.tscn: the inherited scene with the steps that lead to the bug. This scene has the scenario with custom animation player and that reproduces the steps I mentioned, and it doesn't work correctly.
RunTest.tscn: run to see it at runtime. The Red Machine correctly plays turn on then transitions to loop, but then it can't have custom animation tracks.
The white machine is the one bugged, you can see the Turn On animation does not play and the machine gets stuck and then jumps to the loop animation.
The text was updated successfully, but these errors were encountered:
Godot version
4.0-beta8
System information
Windows 10
Issue description
Consider the setup: a Skeletal Mesh with Animations, thus having an Inherited
AnimationPlayer
, and then you create anotherAnimationPlayer
, with tracks that play animations from the inheritedAnimationPlayer
and/or additional custom tracks, such asCallMethod
tracks.Then if you call the animations from the custom AnimationPlayer with a State Machine
AnimationTree
, theAnimationTree
does not interpolate the transitions between the animations correctly, creating either "stuck" frames or freezing the 1st animation before transitioning to the next one.If you play animations from the inherited
AnimationPlayer
(the animations from the mesh, with nothing else), then theAnimationTree
correctly transitions.My current example
MoendaDiesSad.mp4
Steps to reproduce
AnimationTree
and anAnimationPlayer
Animation 1 (ex: "TurnOn)":
AnimationPlayback
Track, and insert a key playing an animation from the inheritedAnimationPlayer
CallMethod
track and call the method you added to the scene beforeAnimation 2 (ex: "Loop)":
AnimationPlayback
Track, and insert a key playing the other animation from the inheritedAnimationPlayer
AnimationTree:
Anim Player
paramCallMethod
the 1st one and then anAt End
,Auto Advance
transition that transitions to the other oneTest:
If you test, the 1st animation "TurnOn":
But if you manually play the custom "TurnOn" animation added before, it plays correctly. Then in the AnimationTree, it doesn't.
Minimal reproduction project
EventInAnimationDemo.zip
MachineMock.glb
mesh, with an AnimationTree, using the original AnimationPlayer. This scene works correctly.The white machine is the one bugged, you can see the Turn On animation does not play and the machine gets stuck and then jumps to the loop animation.
The text was updated successfully, but these errors were encountered: