Ogre3D and bullet: plain bullet or OgreBullet ?

gokoon
Posts: 9
Joined: Fri Jan 27, 2012 10:57 am

Ogre3D and bullet: plain bullet or OgreBullet ?

Post by gokoon »

Hello,

I have an Ogre3D application, and all I need is collision detection.

I need an honest opinion, I already managed to link bullet into my project, created a CollisionWorld, but I'm still a little lost... To begin I just want to detect collisions with simple btSphereShape.

Should I use btOgre instead ?
kloplop321
Posts: 55
Joined: Sun Jan 01, 2012 7:37 pm

Re: Ogre3D and bullet: plain bullet or OgreBullet ?

Post by kloplop321 »

If you want to have a premade solution which can possibly suit more advanced needs in the future, such as active rigid body dynamics, go with btOgre.
Otherwise, if you just want to do collision detection, btOgre, or any wrapper, would bring more overhead than you need.

I'd suggest making a btCollisionObject, setting its transform information, and then running world->ContactTest(sphereThing,&callbackResult)
where sphereThing is a btCollisionObject*
and callbackResult is a btCollisionWorld::ContactResultCallback.
http://bulletphysics.com/Bullet/BulletF ... World.html
http://bulletphysics.com/Bullet/BulletF ... lback.html
jokooon
Posts: 15
Joined: Wed Apr 20, 2011 12:42 pm

Re: Ogre3D and bullet: plain bullet or OgreBullet ?

Post by jokooon »

So each frame I need to set a new worldtransform ?