- Home /
Character with several colliders and rigidbodies
I am doing a PvP fighting game. This is the GameObject hierarchy of the player character.
Player contains:
Legs
Sword
Torso
Head
I want to be able to
Register impacts of the sword on a specific body part
Use AddForce on the whole player entity when a body part is struck
Change the animation of the player that owns the sword that hit
Questions
Is it correct that the only rigidbody should be on the root Player GameObject ?
Is it correct that The body parts should have colliders and be triggers ?
Is it correct that The swords should have colliders but not be trigger ?
I'm just doing that with weapon system not melee for now, ...
well, ...
afaik it's enough if rigidbody is only in the root
trigger or collider depends on how you model it but afaik 1 has to be trigger and 1 has to be collider
same as 2.
for 2 && 3 I'm unable to make it collider as I have my character moving around with character controller so I had to make it trigger otherwise it falls through floor: so it totally depends how you model it
there's something else, ...
I've done 12 colliders for each character and I gain phisics limit at 80 characters (that was tops)
when I made 1 collider and if it was activated I deactivated it and activated other 12 at that specific character I could have 1300 characters and I still didn't get any phisics limit BUT my hardware wasn't fast enough to follow through every char fast enough it allmost crashed as it was there like 1 frame per 10 seconds or more
thought this will be helpfull but guess it's not
But i need the player root object to have a rigidbody so i can add force to it. And i also need the sword inside the player to have a rigidbody so it can collide with other players body part and cause colision.
Your answer
Follow this Question
Related Questions
Can't click gameobject when over another trigger? 1 Answer
Triggering platform animation on colliding with Button 0 Answers
Use trigger with player but have a collider with everything else? 3 Answers
How do you go from one scene, to another, then a third and back again ? 0 Answers
Stop object colliders (non-mesh) bouncing on collision 1 Answer