Is there a direct way to check for interferences with a convex polygon?
CollisionWorld currently exposes methods for the retrieval of interferences with a ray, a point or an AABB. For my use-case however, I need to retrieve all objects that interfere with a ConvexPolygon.
My current approach is the following.
- Enclose the polygon in an AABB
- Retrieve the interferences with said AABB
- Filter them manually by using the Separating Axis Theorem in order to check if the polygon actually contains them.
Is there a better way to do this without using the sensors API?
@jnferner This is indeed not yet possible without perhaps inserting a new sensor and see what touched it after one step.
This is a feature we could add to ncollide though. The approach would be essentially the same as what you already did, except for the step 3 where we would have to use our narrow-phase proximity algorithm dispatcher to select the right implementation for the test.