Control camera position by a jit.gl.handle
Sometimes this patch behaves strange. I would like to control a camera position by using a handle like the way cameras can be positioned in 3D animation programs like Blender or Maya.
For this I have created a patcher that uses a camera that shows the 3D world with every object inside including a second camera that should be moved by a handle. This camera acquires the actual movie.
My problem: When I try to pan the camera (move only position by cmd+drag in the world window) sometimes the camera doesn't follow the mouse but moves to the left corner. The behaviour occurs not every time and I couldn't figure out what causes it to happen. Mostly directly after loading the patcher this behaviour can be observed and it remains.
Any help on this is highly appreciated.
Edit: The strange behaviour is also characterised by that the handle not only reacts to mouse moves within the normal handle radius but also outside.
There is no problem if I change the position in the corresponding atrrui of the jit.gl.handle.

I am totally stuck with this. Meanwhile the problem occurs not only sometimes but nearly every time I load the patch. Any ideas what is going wrong here?
I observed the following:
a) cmd + mouse drag let the camera/cone move to the left if locklook = 0
b) cmd + mouse drag let the camera/cone move to the center if locklook = 1
c) The handle h_cam2BeObserved reacts to mouse clicks outside of its radius
d) There is no problem if one changes the position with the attrui of handle h_cam2BeObserved
e) Problem is the same with jit.world @high_res = 0 or 1
f) Deleting the other handle h_ultraWorld also does not change the problem.
yeah it's a little funky. I'd overcome this by adding the scene objects and the controlled camera to a separate node context. you can then send the captured output to the jit.world for display if desired:
Hello Rob, I don't know if I understood something wrong with your strategy.
I came to the point using the initially posted patch, because jit.gl.node did not solve my problem. Also your patch does not work as intended, because now the movement of h_cam2BeObserved also effects the cam3D ultraWorld window rendering (even if I remove the texture patch cord, that you have added). This rendering should not be affected. It is intended to only navigate within the cam3d ultraWorld window.
Like the normal design viewer in Blender or Maya cam3D should enable navigation in the model space while there is a separate camera that belongs to the model space that records the final rendering scene (in my patch this is drawn to the jit.pwindow).
In your patch cam3d and cam2BeObserved seem to be the same camera.
ahh, Ok I misunderstood. It's actually much simpler, you just need to control the draw order of the cameras using the layer attribute. I think the handle will pull the transform from the first drawn camera, which should be the non-capturing camera in your case for proper functionality:
Perfect. This behaves correct. Weird I already tried to use the layer attribute, but without success and I also still don't understand, why the initially described problem did not occur every time with this patch.
But thanks, I think it is not worth spending more time on this question.