- Home /
How to let the player collide with animated objects?
How can I let the player collide with sidewards moving walls? The wall goes right through the player now.
Do you have a collider attached to the wall?
Basically colliders don't work if they are attached to an animated mesh. So if you have a $$anonymous$$odel with an armature you should attach the Colliders to the Bones and not the $$anonymous$$esh.
Does the player collide with the wall if it's not animated? Did you make the animation in unity or in Blender/$$anonymous$$aya/....? Do you have a rigidbody attached to the Wall?
The wall has a collider. I created the animation with the Unity editor. A rigidbody to the wall doesn't fix the issue.
I made some tests and it seems that collision can bug out if the surface the Player collides with is small or the wall is moving too quickly. If i add a rigidbody to my TestWall the Collision seem to work better although the Wall is now acting less like a wall :)
In some cases you may be better of using a script and maybe even help out with raycasts ins$$anonymous$$d of an animation.