Melee Weapon Hitting Player

Hello,

I’m having an issue with melee weapon I created for my player. What is the correct physics settings and components to get the weapon - in my case a sword - to not interfere with player’s animation? Something is causing this strange ducking behavior when the sword with a convex mesh collider hits my characters capsule collider. I don’t know how to fix this. I tired doing stuff with the physics layers, like having the sword on a separate layer than the player on a separate layer and unchecking their interaction on the collision matrix. I added a kinematic Rigidbody, tried just a standard collider, but I don’t know what it is.

Any ideas?

Are you using collision or triggers for that? I can’t remember if that did something but you can check if that has any effect. I guess you’re using triggers.

Otherwise, you could just filter the effect manually (through a conditional in code). Maybe use tags, or if all its colliders are on a same game object, try saving the game object somewhere and comparing them through instance ID. That way you can be certain the specific game object will never detonate the collision with that specific instance of your blade.

Hope you solve it somehow, cheers.

Privacy & Terms