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


    Apr 12 2015 | 1:10 pm
    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

    • Apr 13 2015 | 4:28 pm
      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:
      i will make sure the touch message gets fixed for the next release.
    • Apr 13 2015 | 10: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 | 9: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 15 2015 | 2:00 am
      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 15 2015 | 2:16 am
      phys.point2point seems perfect! Thanks a lot Rob.
    • Apr 15 2015 | 2:36 am
      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 | 10: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 :
      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 | 7:18 pm
    • Feb 24 2017 | 8: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 | 10: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 | 4:56 pm
      use a different constraint, such as jit.phys.hinge
    • Feb 24 2017 | 5:29 pm
      Great !
      At first sight It looks ok.
      Thanks !