#The collision shape stays static while the AnimatableBody3D plays the animation

7 messages · Page 1 of 1 (latest)

gray osprey
#

I'm following this tutorial https://youtu.be/0JZ_JQUyDLM?si=chNlY1TvBQllOu-n&t=1661 and followed it exactly except I created the door opening and closing animation from rotating the door Node3D itself rather than creating a child hinge Node3D and the animations work fine. However, when the animation plays and the door opens, the collision shape stays static and I cannot walk through the door. Also, the "E (Interact) pops up only when looking at the empty space as if the door is still closed.

cinder mural
# gray osprey I'm following this tutorial <https://youtu.be/0JZ_JQUyDLM?si=chNlY1TvBQllOu-n&t=...

The animatable body seems to be the issue https://github.com/godotengine/godot/issues/67257#issuecomment-1492678387
If you change the rotation of the parent Door Node3D you should use a StaticBody3D instead.
If you want to use a AnimatableBody3D you should change its rotation instead of the parent in the AnimationPlayer

GitHub

Godot version 4.0.beta2 System information Windows 11 Issue description I created a moving platform composed this way: The Playback Process Mode of the Animation Player is set to "Physics"...

gray osprey
#

Thanks!

cinder mural
#

Np! Btw. to add to this since i noticed that recommending moving a staticbody is probably not the best idea 😅 :

  • Only use the StaticBody3D if the physics of moving the door doesnt really matter in your game. (Like pushing anything that should collide with the door) It is meant to be used for non moving things (hence the name) or moving surfaces when you change its constant_linear_velocity properties.
  • Otherwise AnimatableBody is the choice for that.
    (Pics from the docs)
gray osprey
#

I'm not sure how to rotate the animatablebody3d like a door would without the node3d as a hinge

cinder mural
#

Could you show how your door looks like, or if possible how it should rotate ?
You could have the AnimatableBody3D transform in the origin(which will be the hinge) and just offset all its children.