rdeioris / glTFRuntime-docs

Official Documentation for the glTFRuntime Unreal Engine Plugin
MIT License
103 stars 17 forks source link

What is the difference between LoadSkeletalAnimation and LoadNodeSkeleletalAnimation? #16

Closed sunrui19941128 closed 2 months ago

sunrui19941128 commented 4 months ago

I would like to know the difference between these two methods. The glb I loaded in UE cannot be played. Can you provide a screenshot of the blueprint, I found that this glb has been parsed as nodeAnimation, but it cannot be played no matter what Soldier.zip

rdeioris commented 4 months ago

Hi, Unreal expects animations to be backed up by a skeleton, while glTF allows to animate the transform of any node. For this reason, in addition to standard Skeletal Animations (the ones you extract with LoadSkeletalAnimation) there is a pure-curves extractor that just extracts an array of transforms you can apply as you prefer (there is a pretty naive example in the glTFRuntimeAssetActor class using the Tick). Your asset has nothing particular, it is a plain skeletal animations (well there are 4 of them). You can just use the provided glTFRuntimeAssetActor and you will get the idle animation (it is the first one). Otherwise (once you have the skeletalmesh) you can load one of the 4 with LoadSkeletalAnimation()