2
\$\begingroup\$

I'm trying to picking some object with rayTest method of BulletPhysics. The problem is my stage is surrounded with walls (btStaticPlane) and the target objects (btSphereShape) are in there. And I'm trying to pick with a line from the outside of the surrounding box.

So I have to exclude the planes from rayTest. How can I do this?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

when you call raytest function from btCollisionWorld class it returns all the object your ray hits (according to this page). so you just need to iterator over all the collisions and then just pick the ones you want.

you can also create a new instance of btCollisionWorld and call raytest from that instance.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .