Collisions with animating characters

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By LoneWolf155

I am attempting to import an animated character I have made using Blender (3.2.1) into Godot (3.5) for use as an enemy in a first person shooter prototype I have been playing around with. Everything imports properly such as my materials, models, and all that jazz. However, since this is an FPS, I need collisions relatively accurate to my character model that also move along with its animations.

This is where the problem is as there does not seem to be an easy way to handle this. It seems the best method to do this would be for me to manually add in a BoneAttachment, a RigidBody, and then a Collision shape for each bone then adjust the collision shape to match the model. This entire process seems rather tedious and makes me wonder as to how performant it would even be. I know that Godot offers the ability to “create physical skeleton” but that is for doing ragdolls (and it even seems bugged as it doesn’t even do the entire skeleton but that is a different problem).

So, my question is, is this REALLY the best way to handle this? If so, looks like I will probably end up making some code that will just do it for me. Odd that there isn’t even the ability to auto-generate BoneAttachment nodes per bone.

:bust_in_silhouette: Reply From: stormreaver

I don’t think this is possible in Godot (as of 3.5.2 and 4.0), as it does not allow you to animate collision meshes.

I think the best you’re going to get is to have multiple separate collision shapes (some combination of capsule shapes, box shapes, etc) along your character, and animate the positions and rotations of each of the collision shapes individually.