Forums > Jitter

How to simulate jit.phys.picker without using mouse?


Apr 12 2015 | 6:10 am

I tried to accomplish the behaviour of jit.phys.picker by changing the position of jit.phys.body, but the behaviour is different. When you set the shape of jit.gl.gridshape to cube, you can see the crazy rotation of the cube caused by drastic mouse movement, but it won’t happen by changing the position values.
How would you simulate the jit.phys.picker behaviour without using mouse?
My current goal is to achieve the similar effect of jit.phys.picker via Leap Motion.

Many thanks for your help in advance,
Masa


-- Pasted Max Patch, click to expand. --

Apr 13 2015 | 9:28 am

you can simulate phys.picker by attaching a phys.point2point constraint to your phys.body changing the position2 attribute.

however, a better solution for the leap, is to use the phys.picker "touch" message. unfortunately i am just now realizing that this is broken in max 7. if you want to use max 6, you can at least check out the functionality:


-- Pasted Max Patch, click to expand. --

i will make sure the touch message gets fixed for the next release.

Apr 13 2015 | 3:40 pm

Thanks a lot for your great advice Rob!
OK, I will get back to Max 6 for this project, while looking forward to the next release.

Apr 14 2015 | 2:45 am

I found that the "touch" message for jit.phys.picker uses x and y information for pseudo 3d mapping. I would like to make use of the z information of Leap Motion. I would appreciate any suggestion.

Apr 14 2015 | 7:00 pm

then yes, you probably just want to create a phys.point2point constraint, and use the leap values to control its position.

you will want to offset the constraint from the center of the phys.body using @position1, in order to get the swinging around effect.

Apr 14 2015 | 7:16 pm

phys.point2point seems perfect! Thanks a lot Rob.

Apr 14 2015 | 7:36 pm

I am using the grabbing action of Leap Motion as a hold-down (click) action of jit.phys.picker. Basically I’d like to switch between the state of being controlled by my hand and the state of being controlled by gravity.
When phys.point2point is connected, it seems that the object is ignoring gravity. Is there any way to switch between the states?

Many thanks,
Masa

Feb 23 2017 | 2:01 am

Hello,
I’m joining this post because I’m beginning to work on a similar project.

I want to interact with 3D cylinders with Leap Motion to create selection tools, like "pickers" in iOS :
https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/UIKitUICatalog/UIPickerView.html

I’d like to make cylinders rotate on only one axe, in two directions, just "touching" them with Leap Motion.

I’m a beginner with OpenGL, I red some posts here, and I understand I’ll need to use "jit.phys.picker" ; Leap Motion external from Ircam.
But I’m wondering how to :
– make Leap Motion replace mouse actions with jit.phys.picker ?
– use the "touch" message Rob mentionned earlier ?
– make sure the cylinder just rotate on the axe I choose and not move around freely ?

Thanks for any help.
Alain

Feb 23 2017 | 11:18 am

check out this thread: https://cycling74.com/forums/topic/link-leapmotion-data-to-rigged-3d-hand/#.WK80lVfSeB0

and check out this package: https://github.com/robtherich/jit.phys.3dpicker/releases

specifically the 3D-Picking-example patch.

Feb 24 2017 | 12:59 am

Thanks Rob,
Now I have to study this, but I think I understood the logical.

By the way, have you a suggestion to make the object touched by the "jit.phys.3dpicker" just rotate on an axe and not move around freely ?
Is there a way to anchor it ?

Thanks again,
Alain

Feb 24 2017 | 2:55 am

I test quickly with the "jit.phys.point2point" object, I can anchor my cylinder in space.
In this case, when "touching" it with Leap Motion, it doesn’t move around, but rotates in all axes.
Now I’m wondering how to make it rotate only on one axe…

Feb 24 2017 | 8:56 am

use a different constraint, such as jit.phys.hinge

Feb 24 2017 | 9:29 am

Great !
At first sight It looks ok.

Thanks !

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

Forums > Jitter