Static RigidBody Collision objects

Post Reply
kevindefinit
Posts: 2
Joined: Wed Jan 07, 2015 7:38 pm

Static RigidBody Collision objects

Post by kevindefinit »

Hello,

I'm brand new to Bullet Physics! I'm trying to build a voxel collision engine, where I have a set of static voxels placed arbitrarily around a 3d space. As moving particles collide with a given voxel, I want the voxel to turn the same color as the collided particle.

So far I'm able to detect a collision, but I'm not sure if I'm implementing my RigidBody objects (the voxel) properly since they are kinematic and fall to the ground with gravity (see attached screenshot). I would like for these voxels to hover over the ground, similar to how bricks in Mario work. If there is an example tutorial or some code snippet someone can point me to that would be amazing! Thanks in advance!
Attachments
Screen Shot 2015-01-07 at 5.03.44 PM.png
Screen Shot 2015-01-07 at 5.03.44 PM.png (58.94 KiB) Viewed 4492 times
kevindefinit
Posts: 2
Joined: Wed Jan 07, 2015 7:38 pm

Re: Static RigidBody Collision objects

Post by kevindefinit »

After further investigation, I realize that initializing rigid objects with a mass of 0 will prevent them from moving with gravity (whoops!). But it leaves me wondering, is it common to assign btCollisionObjects and shapes without needing a rigid or soft body object as well? Sorry for all the dumb questions :)
xexuxjy
Posts: 225
Joined: Wed Jan 07, 2009 11:43 am
Location: London

Re: Static RigidBody Collision objects

Post by xexuxjy »

It's useful for doing simple things like collision detection only (if you don't necessarily want the resolution), or for ghost objects for trigger areas and so on.
Post Reply