Coordinate systems of jit.gl.handle, jit.world and jit.gl.camera
Is there a comprehensive documentation about jitters coordinate systems?
One can change e.g. the position/rotation of jit.world and this changes the perceived position of all objects that belong to this world. This position change will not be visible in the position attribute of the objects in the world. They behave like child nodes to the "world node" - their attributes are offsets to the world transformation.
But what about jit.gl.handles? Handles attached to objects don't change their position if the world position/rotation changes. Why?
Is there something special with cameras and handles attached to them - especially when using more than one camera in the same world context?
I am trying to understand some phenomena reported in this post https://cycling74.com/forums/control-camera-position-by-a-jit-gl-handle
Further question: What does the @inherit_transform attribute do at jit.gl.handle? Why isn't it documented and not accessible via attrui? In the help file of jit.gl.node a handle is used with @inherit_transform 1. As far as I understand (but I might be wrong) the behaviour it forces the handle to change its coordinates together with the world transformation.
But also some quirky behaviour can be observed like
a) handle is not visible at the position of the attached object
b) panning is performed in a counter intuitive way.
handles are in worldspace. inherit_transform is a legacy attribute that was required in the pre max 6 days for handle functionality (i'll remove it from the help file, thanks for pointing that out).
if you want to control an object's transform with a handle, but also transform that object with an external system (e.g. the second handle on the object's parent node), you must update the handle object's transform as well.
in your patch the easiest way is to trigger the one handle update whenever the other handle is activated. you must get the world-space transformation values and use those to set the position and quat values of the handle, so you need to use a jit.anim.node to manage the gl object's transformation. hopefully the updates i made to your patch clarify things a bit:
Thanks Rob. This works fine.
Now I can elaborate my project: How to achieve camera control like e.g. in Blender.



Summary of my investigations:
[jit.world] acts like a [jit.gl.node] for all objects like [jit.gl.gridshape], [jit.gl.mesh] that belong to the same rendering context.
Applying a [jit.gl.handle] to the world is like applying this handle to a [jit.gl.node].
[jit.gl.camera] is not added to the world node respectively it is not affected by transforms (position, rotate) of the world.
[jit.gl.light] is not added to the world node respectively it is not affected by transforms (position, rotate) of the world.
[jit.anim.node] - allows for retrieving the world transform by sending messages worldpos or worldquat.
Applying a [jit.anim.node] to a [jit.gl.handle] makes the handle's axes (@axes 1) transform according to the world transform but the mouse coordinates are not transformed and also the mouse over handle position is not transformed.