Ghost collisions/non dynamic collisions with collada import

linksan
Posts: 13
Joined: Fri May 23, 2008 4:30 pm

Ghost collisions/non dynamic collisions with collada import

Post by linksan »

Hey all, I'm working on a racing game and was implementing a system to tell the user how much of the track is completed and if they are going in the right direction.

To do this I create vertical planes that intersect the track at regular intervals, the theory is that if the player passes the planes in increasing order they are going forward.

I was able to create the planes and the track in blender and export it to a collada file but i'm not sure how to import the planes so that they cannot be collided with and still create collision events that I can check.

I tried to make the planes ghosts in blender but I could still collide with them.

Is there a way to do this (or a better way to implement what I want to do)?
I'm using the collada import class included in bullet.

Thanks
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Ghost collisions/non dynamic collisions with collada import

Post by Erwin Coumans »

The Blender COLLADA physics exporter is limited, and doesn't handle 'ghost' indeed.

Easiest would be to write some special code in the Bullet COLLADA importer and recognize the planes (using the name for example), and deal with it accordingly. For such 'ghost' planes, disable the collision response, using

Code: Select all

object->setCollisionFlags( object->getCollisionFlags() | btCollisionObject::CF_NO_CONTACT_RESPONSE);
Hope this helps,
Erwin