Simple problem with Ogre

apokalypsadestroyer
Posts: 5
Joined: Thu May 10, 2007 9:06 pm

Simple problem with Ogre

Post by apokalypsadestroyer »

I use the Bullet with Ogre via OgreBullet, and i set Box collision shape for ogre node, but i need to move the center of shape to different position in the node, can anyone help me?

sory for my bad english, im from Czech republic
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

You can shift the center of mass, by using a btCompoundShape:

Create a new btCompoundShape, and add the box shape as childshape, with a btTransform offset. Make sure to initialize the offset properly, not just setting the origin, so use offset.setIdentity().

Hope this helps,
Erwin
apokalypsadestroyer
Posts: 5
Joined: Thu May 10, 2007 9:06 pm

Post by apokalypsadestroyer »

Thank you much Erwin, it works 8) :D