Collision Events not Triggering

I have a basic character with a character controller and capsule collider. There’s a picture attached.

I’ve parented some objects to it to represent his weapon, and added a swinging animation. I’ve attached a box collider and a script to the rectangle object, but it never seems to fire. Neither OnCollisionEnter or OnTriggerEnter work on that object, even though I’ve tested the same script on other objects.

Does anyone know what’s going on?

836056--31196--$dethmurdercapsule.png

Not entirely sure but with triggers one body must be a rigidbody. Same in collisions? Best to post script.

needs rigidbody

I wanted to use a rigidbody, but if I attach a rigidbody to it, it doesn’t stay in place like it should.

Also, I’ve tested the script on stationary cubes with colliders and no rigidbody, and it works there.

Solved. You were right about the rigidbody. I guess I just needed some constraints to keep it in place.

Not sure how you’re using constraints but it’s easiest by just setting the rigidbody in question to be kinematic. Don’t use the those movement/rotation constraints in the inspector. Kinematic will keep it a rigidbody while also letting you control it’s placement rather than the physics engine.

Thanks for the advice. I wasn’t really sure what that Kinematic thing meant.