How do you make an animated object collide with another object?

I have an animating of an axe swinging around my first person controller and I need it to collide with the trees. Does the tree need a rigidbody or just a collider?

trees with rigidbody????? I think just collider is fine.

–

2 Answers

2

Collider Because rigidbody makes your object move, like when you add ball to scene and when you add rigidbody ball will move when you kick it.

Note that adding a rigidbody or a collider will not stop your animation. It’s possible to: by actually animating an invisible kinematic rigidbody, and attaching your visible axe & arm (also a rigidbody, but not kinematic) via a joint.

But if all you want is to know when the axe collides (eg. then destroy the tree), then a kinematic rigidbody will suffice.

does the rigidbody need to be on the actual axe or the empty that it is a child of? I have it on the empty right now and it won't collide with the tree during its animation

–

As you've got it should work. The physical shape of a Rigidbody is the sum of all the Colliders in it's own GameObject, down through children to but excluding any descendant Rigidbodies.

–