SegmentQuery with custom Collision filters
-
- Posts: 3
- Joined: Tue Dec 17, 2013 7:09 pm
- Contact:
SegmentQuery with custom Collision filters
Our engine has a larger set of needs for collision filters than layers and groups can do. Chipmunk does a great job of allowing us to use our filters by allowing us to override the BeginSolver functions for collisions. However, it does not look like this is possible for SegmentQuery. Is there a way to do something similar for SegmentQuery?
-
- Posts: 3
- Joined: Tue Dec 17, 2013 7:09 pm
- Contact:
Re: SegmentQuery with custom Collision filters
Alternative? To do this should we have all objects on the same group/layer and hook our filters into the cpSpaceSegmentQueryFunc callback?
-
- Posts: 29
- Joined: Wed May 09, 2012 12:06 am
- Contact:
Re: SegmentQuery with custom Collision filters
I ran into a similar problem and that was basically my solution - relying on the callback to do extra filtering. I'd suggest having your layers be high-level shared filters that the collision and query callbacks can filter down into lower level filters rather than just using a single layer for everything if you can since the layer filtering is done before the callback is even called thereby saving some work.
Who is online
Users browsing this forum: Bing [Bot] and 5 guests