Creating a collision object with no visual representation?

PolyVox

03-03-2008 21:09:06

Hi,

I've just started playing around with OgreBullet and so far I like what I see. I've got my first couple of cubes bouncing off each other :)

What I would like for my project is to create a static object with no visual representation. It doesn't need to respond (so maybe it doesn't need to be a rigid body?) and I don't see why it would need to be added to the Ogre scene manager either. It's just an invisible piece of static geometry which my visible objects should be able to bounce off of. The geometry will be quite complex (a TriMesh).

What's the best way to do this? Does OgreBullet provide a way? Or maybe I need to dig into raw Bullet? Is it possible to mix OgreBullet and raw bullet in the same scene? Anything particular I need to be aware of?

Thanks in advance :-)

tuan kuranes

04-03-2008 12:10:03

What I would like for my project is to create a static object with no visual representation

Check how planes / house(trimesh) are created in the obrebullet demo code. Don't remember how tied graphic is to physic representation.

Is it possible to mix OgreBullet and raw bullet in the same scene?
Mixing raw bullet and ogrebullet is ok AFAIK.

But you can modify ogrebullet to obtain what you need easily I guess, and
as a bonus, being able to still have some debugging view somehow (even if current debug lines view is slow.)

Anything particular I need to be aware of?

Patches are welcome ;)

PolyVox

04-03-2008 21:30:29

Thanks for the help - I have found the RigidBody::setStaticShape() function which allows me to avoid creating SceneNodes and passing them to the rigid body. I think this is what I want for the time being, but I may well dive into some raw bullet later.