Sweeping with a btCompoundShape

angrybaker
Posts: 10
Joined: Mon Nov 17, 2008 10:40 pm

Sweeping with a btCompoundShape

Post by angrybaker »

I have a physics object that uses a btCompoundShape, which contains a single btBoxShape.

I'm trying to do this:

Code: Select all

	
	Assert( m_Object->getRootCollisionShape()->isConvex() );
	bw->convexSweepTest( (btConvexShape*) m_Object->getRootCollisionShape(), tfFrom, tfTo, SweepCB, 0.0f );
Obviously this is going to fire the assert and crash because btCompoundShape isn't isConvex and doesn't derive from btConvexShape.

Is there an easy way to make this happen - or should I try to manually sweep each child shape?