- Home /
How to do "cosmetic" physics with joints to produce secondary character motion?
I have a character that's essentially a sphere. This character has ears which I'd like to use joints to flop around a bit using physics. This is meant to be strictly cosmetic, the ears are not meant to be part of the character's main movement or hit detection.
The problem is, during my testing, I've attached a cube to the object via different joint types, including hinge and character joints. With some tuning the motion looks nice is remains stable. However, the mass of the cube's rigidbody is now being added to the character's mass, making him jump lower when upward forces are applied.
What's the best way to achieve cosmetic physics such as this that don't impact the character's rigidbody?
Answer by Bunny83 · Apr 29, 2011 at 01:57 AM
Well, that's a general "problem" with rigidbodies, they influence eachother. To ensure a stable movement you can use a CharacterController but if you need to use a rigidbody that's no problem.
Another way would be to have a second kinematic rigidbody that "follows" the characters rigidbody via script but is not connected in any way to the real (player's) rigidbody. Just attach your "cosmetic" attachments to the kinematic RB. That way the attachments can't influence the player. Make sure that you setup the collisions in a way that they can't disturb the players movement.
Would putting the character's rigidbody on a different layer from the "limbs" be a good idea for separating this out?