0 votes

I'm trying to make it so that I can reimport my player model every time I add new animations easily. I think the way to do that is to NOT make a new scene from my .glb file but to just 'link' the glb inside my Player scene. Below shows "Arms" which is my player .glb which has an AnimationPlayer inside it.

How can I link the Player's AnimationTree to that 'inner' AnimationPlayer located inside my .glb scene? Or is there a way to put an AnimationTree inside my "Arms" scene (the imported .glb file) but make it so that when I update/reimport "Arms" it doesn't remove the AnimationTree but updates all changes to internal animations and model changes?

enter image description here

Any help would be great! Thanks!

Godot version Godot 3.4
in Engine by (39 points)

2 Answers

+1 vote
Best answer

Thanks, Inces, but I was able to get it working by doing this:

  • Make multiple animation actions in Blender
  • Tell Godot to import .anim files (so that it imports the animations separately)
  • Made a new AnimationPlayer under my KinematicBody and loaded each animation
  • Linked the new AnimationPlayer to my Arms root
  • Linked the AnimationTree to AnimationPlayer

This allows for the animation stuff to be decoupled from the actual .glb file which means I have to reimport for changes and if I have new animations, I have to add them in the AnimationPlayer but the Arms are updated correctly and everything stays good and the new animations/changes are added/updated.

by (39 points)

ehm ok, but ins't it basically what I told You in second paragraph of my answer ? ;)

Oh. I didn't see that part. I had already gotten it working before the Q/A posted my question (I guess they check post before making them public) so when I saw yours, I only skimmed and the first paragraph kinda confused me. But yes, the multiple animations was the way! Thanks :)

I am now struggling on getting the moveandslide() to STOP ON A SLOPE lol it's killing me, that problem.

Godot is fun, tho. I like it better than Unity and Unreal.

0 votes

Try to right click parent of your linked .glb asset and choose "Editable Children". If I remember correctly this should not disturb connection between .glb and scene on eventual reimport. It is used mainly for connecting signals and picking references, so connecting to AnimationTree this way should be good idea.

I don;t know if this helps in this partciular example, but You can also choose to import animations as separate files, instead of them being built in to mesh.

by (7,743 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to we[email protected] with your username.