Best way to join 2 entities in a odd way?
Posted: Thu Apr 18, 2013 3:36 pm
Hey everyone.
I have a creature (humanoid) with physics for the body and head (for now) attached to the body and head bone.
The body piece of physics is the actual "body" of the creature and all the rest (head arms etc...) are just sub bodies for fleshing out the collision.
The model is "attached" to the body piece of physics, all other physics are attached to the various bones of the creature.
Now with just the body, the creature can move around and the player can interact with it (push it around etc...) and all is good.
The problem is that when the head physics is attached (which I want the player to be able to collide with) to the bones by setting the physics world matrix each frame the player cannot "push" the creature from the head physics, only by the body physics.
So I have been trying to find a way of attaching the 2 bodys with joints so that if I push the head the body will react. But as the head moves each frame on the animation this has proven to be quite hard.
I tried to adjust the joints each frame so they always tried to keep the head physics where I wanted but I couldn't get anything that looked correct or that was stable...
Any ideas on how I can achieve this? There must be a better way.
Thank!
I have a creature (humanoid) with physics for the body and head (for now) attached to the body and head bone.
The body piece of physics is the actual "body" of the creature and all the rest (head arms etc...) are just sub bodies for fleshing out the collision.
The model is "attached" to the body piece of physics, all other physics are attached to the various bones of the creature.
Now with just the body, the creature can move around and the player can interact with it (push it around etc...) and all is good.
The problem is that when the head physics is attached (which I want the player to be able to collide with) to the bones by setting the physics world matrix each frame the player cannot "push" the creature from the head physics, only by the body physics.
So I have been trying to find a way of attaching the 2 bodys with joints so that if I push the head the body will react. But as the head moves each frame on the animation this has proven to be quite hard.
I tried to adjust the joints each frame so they always tried to keep the head physics where I wanted but I couldn't get anything that looked correct or that was stable...
Any ideas on how I can achieve this? There must be a better way.
Thank!