What is going on here? gl.handle and gl.picker don't seem to work together!

ygreq's icon

Hi guys,

Do you know what is going on with gl.picker when you move the objects around with gl.handle. It seems it starts seeing object where there are none. Check the attached pic.

Max Patch
Copy patch and select New From Clipboard in Max.

Any hints are more than welcome?

Screen-Shot-2014-02-18-at-01.43.40.png
png
ygreq's icon

Ah! oH well, it seems that the printscreen engine on OSX is smart enough to print without the mouse. Unfortunately! Well, the whole idea is that if I reset the gl.handle everything works quite as expected. But if I move the objects with around without them overlapping (just like in the pic, for example), gl.picker will detect mouse clicks on an object even though I click with the mouse in between the objects. So it detects objects where there are none!

Rob Ramirez's icon

gl.picker uses a fast approximation to do picking (AABB, axis-aligned bounding box testing), and so in cases where the AABB does not line up with the world-space bounding box, these false intersections occur.

Max Patch
Copy patch and select New From Clipboard in Max.

if you want exact picking, you should use jit.phys.world, static jit.phys.body objects and jit.phys.picker without dynamics enabled: