detecting "out-of-object" in jit.phys.picking ?
Hi,
I am trying to make a toggle out of a jit.phys.object, but I get stuck on a simple issue.
I would like the toggle to behave this way :
- the "click" is taken into account on mouseup
- the "click" is cancelled if mouseup is happening outside the object.
See patcher below for a (failing) demo.
It seems like contact information is near at hand (since it given on mouse down), but is missing for my aim...
Thanks
Vincent
seems to work more like you want if you disable dynamics on the phys.picker, no? and maybe also enable hover.
Thanks Rob, you're right, disabling dynamics prevent an output if the interaction is outside the object.
The problem is that I need dynamics (and output_positions) for other objects in my context (and worse : some objects that are not dynamic may become dynamic at some point).
So I would rather handle the problem locally (at a phys object level) than globally on the phys.picker.
Here is a workaround using hover, but I wish I could get rid of the delay.
hey Vincent, i'll see if there's anything that can be done to make this easier.