Hello. How can I add animation from the Mixamo to the character in the engine itself? I downloaded some animations for the character, I need to upload them through the engine. Is there anything similar to Unity’s Mecanim in this engine?
Hello!
Let me answer this first
In short: no, we don’t have Mecanim, but you can build a functionality similar to Mecanim on top of CGE API.
Details: In Castle Game Engine we support playing named animations through TCastleScene.PlayAnimation with a possible “transition” (cross-fade) with a previous animation. See Writing code to modify scenes and transformations - “8. Playing animation” section.
So while we don’t have a Mecanim (visual way to arrange animations’ transitions in a graph, and expose simple parameters to control the state of this graph from C#), you can implement something similar in your own code “on top” of CGE PlayAnimation. You could implement a method like ChangeCharacterState(...) that calls CharacterScene.PlayAnimation(...) based on the desired state (and based on the currently playing animation, which is in the CharacterScene.CurrentAnimation).
I don’t have a ready answer for this, but I know that others used Mixamo animations with CGE.
For what I know, in the simplest case, you can just do this in Blender and export the glTF file with new animations to be used by CGE.
Sorry I don’t have a better answer for this now myself, maybe others can help. Feel free to ping for a better answer here, if the above doesn’t help ![]()