Box Collider not moving with animation

Hi there, hope this question hasn't been asked before already (had a look and I couldn't find anything).

Basically I have a door modeled in maya with an opening animation attached, I exported this to unity as a fbx with an heirachy of the door and the handles which are also animated.

I'm using a box collider on the door then through raycast and tags to trigger the animation.

Everything seems to work but unfortunately for some reason the box collider doesn't move with the animation so even the door is open I can't walk through to the other side (I can walk through the door now though, which obviously doesn't help).

I think I'm probably missing out something obvious but can't seem to fix this, any help would be appreciated!

Thanks in advance!

The animation only moves the mesh being displayed, it does not change the transform of the object, which you have applied the BoxCollider to.

If it is only a simple open animation I would definitely suggest not using animations to turn the door, but modifying the rotation directly from script.

If you still want to use the animation, or need to do animation for something that’s a bit harder to use scripting for, such as a whole character, you can attach primitive colliders ( SphereCollider, BoxCollider, CapsuleCollider) to bones, and they will follow the animation.

Hopes this answers your question

someone already identified the error
Please I have this problem and I can’t find how to solve it