Bullet Physics and Ogre Animations?

Started by
1 comment, last by __Homer__ 13 years, 5 months ago
This is more of a general question than anything concerning the two specific libraries, however I am extremely confused on this topic. I began setting up a Kinematic Character Controller in Bullet for my game yesterday, and I am using Ogre for my Rendering Engine.

My character mesh (in Ogre) is animated, but I am now confused on how exactly I can get an accurate physics representation of it into Bullet. For a simple game, I understand you can just use a primitive shape to encompass the general size of the character, but for something like an FPS game, having an accurate collision mesh is necessary.

So my confusion is how exactly would I use a collision mesh with an animated mesh? Just taking a shot in the dark, I was thinking perhaps you give the collision mesh bones and then merge them with the relative bones on the visible mesh to make sure it is accurate.

Anyways, I am just extremely confused as to how a physics collision model is kept accurate during gameplay when the character is animating.
Advertisement
You should be able to take the bones from the animation and tie them to collision primitives. Just setup a bone-primitive mapping and use your animation skeleton to drive the positions of the collision primitives. When you are done animating the object, look at the RagDoll demo in the bullet demos for how you could then constrain all those primitives together into a phsyics object that could then drive the animation bones.
I've been trying to do something similar with Ogre's 'Jaiqa' animated mesh resource, just to get my feet wet so to speak.
Does anyone have a (small) example of how to achieve this (preferably under Nikki's btOgre wrapper) ?
It appears that Nikki has provided suitable code for this purpose, however I really have no idea how to put it together.. please help!
In C++, friends have access to your privates.
In ObjAsm, your members are exposed!

This topic is closed to new replies.

Advertisement