How do you create a button in 3d space?

ygreq's icon

Hi everyone,

DO you maybe know what objects I should use in order to transform a cube for example into a button (as in it sending messages that it has been pushed/touched)?

I tried using the jit.gl.picker but I think that that object is a total mess. Whenever I have at least 2 objects and I rotate them, it stops reporting them right. I mean, for example it reports I touched one object when I actually touch another. Or if in hover mode, it reports that I hover on an object when in fact I hover onto another or on empty space. And all that if I rotate with gl.handle attached to both objects.

I guess it has something to do with my mouse changing its position within 3d space. But I can't seem to figure out what is actually going on or how to fix it.

Thank you for looking into this!
ygr

Rob Ramirez's icon