Forums > Jitter

using jit.phys.picker without mouse

Nov 16 2011 | 9:11 am

I would need to grab and move object in a jit.phys world , but not using my mouse (for example, using messages coming from a multitouch screen..)

unfortunately, jit.phys.picker doesn’t seen to accept any external message to replace clicking with the mouse in the jit.window.
so here is a feature request :
please add a "mouse" message to jit.phys.picker that would allow to use it without clicking in the jit.window
(and maybe a "mousemode" attribute to select mode ?…)

mouse 130 345 1
would do the same as clicking in the window at position 130 345, and would select the closest object and grab it
mouse 134 348 1 –> drag the previously selected object
mouse 134 348 0 –> release the object

could this be an option for a futur version ?
or is there another way to achieve the same with another method ?
(AFAIK, there is no simple & easy solution in jitter to test witch object is at a specific screen coordinate… (?) )



Nov 16 2011 | 12:30 pm

one possibility, not very elegant, is to use autobot ( ), which emulates the clicks of a mouse.

Nov 16 2011 | 1:05 pm

thanks for this reply, sandroid.
but this is not an option for me, because I want to be able to control several object at a time (–>multitouch)
.. and I need my mouse for other purposes !


Nov 16 2011 | 4:57 pm

hi mathieu. thanks for the suggestion.
request noted, and will show up in the next update.

can you describe further what you mean by "mouse mode" ?


Nov 16 2011 | 5:27 pm

Thanks, Robert !

I’m looking forward this new feature :-)

"mouse mode attribute" : I mean that it will probably be useful to disable mouse click in the jit.window when using messages ; for example :
if I want to use a multitouch screen to grab several objects, I will have to create several jit.phys.picker objects, and actually, it doesn’t seems to be possible : only latest created object works.

so maybe a simple "mouse" attribute would do the trick :
mouse 1 (default) : allows mouse click & drag in jit.window (+ messages ?)
mouse 0 : disable mouse, and use messages only.

by the way : it could be as well very useful to be able to set constrain strength (relaxation ?) when controlling an object with this method.

thanks in advance !


Nov 17 2011 | 12:21 am

ok, thanks for clarifying.

phys.picker is really intended to be used 1 to 1 with the mouse and
however, i think we could add a screentoworld type message to, that will return object names that intersect. this feature was actually built in to a previous version, but has been removed.

this way you can send screen coords to world, get the name of an intersecting body, and create a constraint on that body (phys.picker is simply a phys.point2point constraint), and you can manage as many of these as you need.

would that fulfill your needs?

phys.picker constraint attributes are already planned for a future update :)

Nov 17 2011 | 9:27 am

Hi Robert

I was about to request a screentoworld "ray casting" in another post, so YES, that would be great, thanks !
but if this message returns only the object’s name, I will only be able to grab it by its center..
could it return object’s local coordinate as well ? (the intersection position)
and with this method, it will be probably more difficult to manage the phys.point2point 2nd point’s position..

well, these 2 solutions would be very useful, so if we could have the best of both worlds, I would be very happy !
(mouse messages + screentoworld)


Nov 17 2011 | 6:27 pm

yes, i think it would return object name, local intersection (object relative) and world-space intersection.


Jan 28 2014 | 3:23 am

hello. is this option avaiable now in max? I’m need the same tool to use with kavl kinect tracker. thanks

Jan 28 2014 | 6:10 am

touch message on "jit.phys.picker" works pretty well

Viewing 10 posts - 1 through 10 (of 10 total)

Forums > Jitter