Possible to query for list of contacts w/StaticTriangleGroup
Possible to query for list of contacts w/StaticTriangleGroup
Is it possible to query for the list of contacts with a StaticTriangleGroup? I need this because as I move objects (STGs) around in an editor, sometimes they have Entities resting on them that need to be re-activated. Otherwise the resting Entities just fall through. Any ideas? Thanks.
Re: Possible to query for list of contacts w/StaticTriangleGroup
While you can't get the contacts directly (they aren't any when the objects are resting on a STG, actually), you can do a brute force activation on all entities within a bounding box. Grabbing the StaticTriangleGroup.triangleMesh.hierarchy.boundingBox and querying the broadphase with space.broadphase.getEntities(BoundingBox) will get you the possibly colliding entities with which you can call (Entity).activate(). This will obviously do a bit more than necessary, but needlessly reactivated entities will quickly go back to sleep.