Forums > Jitter

jit.gl.handle & anim.gl.node : correctly orient child axes relative to parent

January 30, 2012 | 7:56 pm

Hi there, probably a question for Rob, but if anyone knows…

If I wanted to control an object with jit.gl.handle @hover 1 relative to a parent so that the orientation of the mouse aligned with the movement of the object on the screen, is there any way to do this?

For example, the position/rotation is controlling a parent and child. If the parent is turned 90′ then when clicking on the child, I would like to be able to reposition it using the 3D axes and mouse controls as a guide correctly oriented to the child.

Looking at the example provided below, try repositioning and reorienting the apple with the mouse.
The axis resides in a different location than the object being controlled by handle. Is anim.gl.node breaking jit.gl.handle somehow? Perhaps is the jit.gl.videoplane in the background breaking things?

When you try and rotate the model and re-position it using the mouse sometimes the model is moving at a 90′ angle to the mouse, which is really un-helpful. I’ve tried fiddling with a few different attributes but so far no luck.

Any pointers appreciated.

– Pasted Max Patch, click to expand. –

January 30, 2012 | 9:07 pm

Oops, I mean jit.anim.node. bah…


January 31, 2012 | 5:14 pm

the problem is backwards compatibility of the jit.gl.handle object.
in it’s original mode (non-autohandle), the handle has no knowledge of it’s connected object’s current transform state, it just blindly sends out position and rotation values based on it’s own current state.

however, position and rotation values for a child object (your anim.node), will cause different transformations then an object with no parent (the gl.handle).

the solution is to use gl.handle in autohandle mode (remove all connections from the gl.handle).

let me know if that does the trick for you.


February 1, 2012 | 5:13 pm

Hi Rob, thanks for the reply! I was avoiding that before only because the auto_handle grabs hold of the background plane which breaks the augmentation, is there any way to make auto_handle ignore a particular object?

Should transform_reset 2 (which is applied to the plane) be overriding an auto_handle?


February 1, 2012 | 7:46 pm

ahh yes, that is a problem. i was able to make it ignore the bg plane by setting it very far back along the z-axis (-50 or so).

i’ll look into adding smarter ways to ignore objects or ignoring transform_reset objects.


February 2, 2012 | 6:44 pm

Would be most appreciated, thanks! Perhaps even something like the preset object, that a secondary outlet of jit.gl.handle connected to a specific OpenGL object ignores it when auto_handle is on?


February 22, 2013 | 3:20 am

I know that this is somewhat old thread, but I would very much to have some more options in the jit.gl.handle object. For example, say you use a jit.gl.multiple to create a bunch of cubes and another jit.gl.multiple to create a bunch of spheres. It would be nice to be able to tell the handle to only grab spheres. Or better yet return the name of the object that was grabbed so that I treat a grabbed sphere differently than a grabbed cube.

Just my two cents.


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