How to get list of all points of collisionshape in world coo

razer
Posts: 82
Joined: Sun Apr 04, 2010 10:08 pm

How to get list of all points of collisionshape in world coo

Post by razer »

How to get list of all points of collision shape in world coordinates?

Is there general way to do that?

I can do something like

Code: Select all

		btConvexHullShape* shape = (btConvexHullShape*)body->getCollisionShape();
		int count = shape->getNumPoints();
		btVector3* points = shape->getPoints()
		for(int i = 0; i < count; i++){
			btVector3 v1 = tr(points[i]);
		}
But I am looking for solution that will work with all shapes. (compound shape, etc)

Thanks