Chipmunk2D icon indicating copy to clipboard operation
Chipmunk2D copied to clipboard

cpSpacePointQuery and cpSpacePointQueryNearest treat sensors differently

Open viblo opened this issue 7 years ago • 3 comments

A user of pymunk made me aware that cpSpacePointQuery and cpSpacePointQueryNearest treats sensor shapes differently. The *Nearest version ignore senor shapes while the other does not. It seems a bit inconsistent and confusing. (The code itself is clear so I dont really know if this is a bug or a feature)

https://github.com/viblo/pymunk/issues/113

viblo avatar May 20 '17 10:05 viblo

Sorry for the long hiatus.

I guess I never really intended either to work with sensors, since their purpose is to trigger when things intersect them only. I'm slightly hesitant to change it after so long, but I guess I'll disable it for cpSpacePointQuery() too.

slembcke avatar Jun 10 '19 18:06 slembcke

Err, jeez. After looking closer, cpSpacePointQueryNearest() is the only query function that ignores sensors. I'll have to think about this.

slembcke avatar Jun 10 '19 18:06 slembcke

:) I can see the point about not breaking anything, but also about making it more consistent.. Not easy what to pick

viblo avatar Jun 11 '19 20:06 viblo