Hello! I have animated blast door in Blender. Blast door have two animations - “Open” and “Close”. During “Open” animation the door at first appears to be closed then it opens. During “Close” animation the door at first appears to be opened then it closes.
Now my problem is… well the model with these animations is imported .fbx file.
of course because it’s a door I would need to y’know change “CollisionShape3D” position according exactly to the animation, so how I can do that and what’s the best way to do that?
Animation also have specific mode of ease - “in-and-out” so it would be quite problematic at first to just follow lerping the movement linear.
What I mean is on this screenshot (at first i wanted to post a video but it’s higher than 8 mb):
Usually objects like these consist of separate meshes/nodes with their own collision, and those get animated.
If you don’t want to go through the process of reworking that, you can remove all collision from the door, and manually attach collision shapes to each door bone instead using the BoneAttachment3D node, as well as adding a separate collision shape(s) for the surrounding wall.
I have placed BoneAttachment3D node to my Skeleton3D node which is part of the imported .fbx model instantiated scene.
Now the problem is that when I add CollisionShape3D node the Godot Engine says that CollisionShape3D should be children of a node which inherits CollisionObject3D.
Basically, this means that I should put CollisionShape3D as a children either of the Area3D, StaticBody3D, RigidBody3D, CharacterBody3D or others.
What should I choose? Should I choose AnimatableBody3D for my case?
EDIT: Should I categorize things a little? Like for the door frame I would use StaticBody3D and for the animated blast door parts I would use AnimatableBody3D?
For a door I would do StaticBody3D, since I assume you don’t want it to move by an outside force other than your script/animations
RigidBody3D would be something like for a ball bouncing and you need to resolve what happens to it through a physics engine (jolt or godot physics)
CharacterBody3D is normally reserved for player controlled scenes
Area3D is for detection of objects around (so a script will know what the player is around essentially) (example: Like a enemies detection range or the player is near this item so auto pick it up)
What is the purpose of AnimatableBody3D then? I mean its name quite states that it’s animatable… and y’know bones are animated and well this means the collisions should be animated… idk.
In this case the difference is that StaticBody3D cannot apply forces to other bodies, but AnimatableBody3D can apply forces to other bodies.
so for example: AnimatableBody3D could push a box in it’s way if the box is a RigidBody3D, but StaticBody3D couldn’t do that.
When AnimatableBody3D is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects.
StaticBody3D is useful for completely static objects like floors and walls, as well as moving surfaces like conveyor belts and circular revolving platforms (by using constant_linear_velocity and constant_angular_velocity).
I would assume that when used with BoneAttachment3D the StaticBody3D inherits the scale of the bone it is attached to, and that might be why it’s larger.
Wow, that’s quite… complicates and ruins things I assume…
I don’t think it’s quite normal I mean is there any way around? The door is properly scaled in terms of meters and now I can’t scale the collision box same way using meters…
When StaticBody3D is part of Skeleton3D the collision box is still HUGE. At the same time when StaticBody3D is part of Skeleton3D it’s of course not animated to the specific bone I need it to be animated. It’s just stays at the same one place.
Right now I’ve tried to scale the collision box. But the measurement is obscure and crazy. Like cmon the collision box with the size of 0.003 (x,y,z) is okay and correctly aligns to my model BUT it’s still weird and obscure.
I guess I will go along with it. I hope nothing in the game engine breaks because of such values of the collision box size.