box vs cyl

bram
Posts: 51
Joined: Sun Nov 23, 2008 4:43 pm

box vs cyl

Post by bram »

I'm new to Bullet, but when trying out bullet 2.82, and running the forklift demo,
I noticed that the boxes that you shoot with right mouse button do not collide with the cylindrical wheels of the forklift.

Does Bullet support box vs cyl collisions?
You do not have the required permissions to view the files attached to this post.
Flix
Posts: 456
Joined: Tue Dec 25, 2007 1:06 pm

Re: box vs cyl

Post by Flix »

bram wrote:I noticed that the boxes that you shoot with right mouse button do not collide with the cylindrical wheels of the forklift. Does Bullet support box vs cyl collisions?
Of course it does :!:
The forklift is a raycast vehicle.
In all raycast vehicles the wheels are not rigid bodies, but just placeholders (they do not exist in the physic engine: dummy wheels are simply drawn on the points hit by each raycast action).
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: box vs cyl

Post by Erwin Coumans »

This is the ray cast vehicle, as you already realized probably, so there is no cylinder there.

Bullet does support cylinder against box (or convex etc) collision, so the demo can be easily improved by adding actual cylinder shapes, so that cylinders collide against dynamic (moving) objects.
(and use collision filtering to avoid the ray test against the cylinders).

Thanks,
Erwin