Pak rotatexyz problems. Unintuitive movements on Y axis, using Kinect

    Aug 03 2012 | 1:07 pm
    Hello there,
    Im working on an interactive project using a Kinect. With body gestures people can rotate a large projected global sphere, everything on that side is pretty much fine. The problem i'm having is with the Y axis. The pak rotatexyz object sends the orientation of the 3d object to my object. The X axis always behaves as you would expect but depending on the position of the X axis the Y axis will behave differently. Its like it has to stick to its pole orientation and becomes very unintuitive to a user, as in a person swipes their hand up and down vertically and it moves like you'd expect but then the X axis will change 60 degrees or so and the same up down hand swipe will have a completely different effect.
    Hopefully you can understand what im talking about.
    Is there a different object i can use? or a way of simplifying, or a way of removing the "pole" of orientation from the Y axis.
    Any help greatly appreciated.

    • Aug 03 2012 | 2:59 pm
      A patch would be really helpful.
    • Aug 03 2012 | 4:05 pm
      Sorry for not uploading in the first place, so, if you fiddle around with the rotation of the sphere manually (which has the same effect as hand gestures do via the Kinect) you can see that the result of changing the 1st int box will differ depending on the value of the second int box, making the cause and effect of the interaction seem unclear.
      I zipped up the patch because there is a jpg needed for texture of sphere.
      I hope this makes my problem more clear
    • Aug 03 2012 | 7:50 pm
      perhaps you want local rotations instead of world. the rotate attributes of gl objects happen in world-space (meaning the rotation is the same, regardless of the objects local axes).
      you can do local rotations by using the "anim_turn" message to jit.anim.node with @turnmode local. i've added an jit.anim.node and a to your patch to allow you to perform the animation using the mouse in the jit.window.
      i'm not sure if you'll find this rotation more intuitive.
    • Aug 03 2012 | 9:45 pm
      Thanks Robert,
      The effect is exactly what im looking for but is there any way I can control the rotations without using the mouse, as in controlling the two axes with ints or floats?
    • Aug 04 2012 | 12:10 am
      rotatexyz to jit.anim.node?
    • Aug 04 2012 | 12:35 am
      Thanks tobiasros, but that is essentially doing what I had before. the rotations when manipulated like this do not behave like i want them to, as in the spheres axes will change depending on its position and thus give different rotation results, as in not uniform interaction on both axes at all times
    • Aug 04 2012 | 12:44 am
      The Local rotations work perfectly for me when using the mouse, is there any way I can bypass using the mouse but still get the same results by manipulating integer boxes
    • Aug 04 2012 | 1:57 am
      ah, i guess you are right, it seems that local rotations work only with the anim_turn message
      (from the reference: anim_turn x [float] y [float] z [float] Rotate the node along each axis by the amount provided, relative to the space indicated by turnmode....
    • Aug 04 2012 | 3:05 am
      this one with scaling...
    • Aug 04 2012 | 3:48 am
      A different way of attacking this: The three number boxes at the top will work exactly like rotatexyz (though setting them all to 0 will not reset the object, but I think it should work for your Kinect purposes) only now they're world-relative instead of object relative. Key points here are the @animmode attribute being set to 'world,' and only sending the delta (difference between successive inputs) to the anim_turn message. Also, pak is not the correct object to use for anim_turn (you wouldn't want to change the message boxes to a single [pak anim_turn]) because you'll end up rotating along axes you don't expect (since pak will store the last number for its internal list, and output it again whenever any one of them turns).
    • Aug 04 2012 | 4:11 am
      nice, with less objects and without uzi and pak is definitely better...
    • Aug 04 2012 | 11:35 am
      Thanks MuShoo, that's really great, perfect in fact