jit.gl.camera question

t's icon

I am posting here a slightly modified jit.gl.camera help patch. And there are two problems:

- When I significantly change the camera position, the lookat point disappears from the window? In Max5, using jit.gl.render, lookat point always stayed in the center of the screen...

- Try rotating the torus. The rotation seems totally buggy?

I am using MacBook Pro, Intel Core 2 Duo, 2.4 Ghz, NVIDIA GeForce 8600M GT graphic card and Mac Os X 10.6.5.

Max Patch
Copy patch and select New From Clipboard in Max.

PS: In some other patch where I control lookat with some moving object coordinates, i can't change rotatexyz values or they start changing automatically...?

t's icon
Max Patch
Copy patch and select New From Clipboard in Max.

it seems it is not a jit.gl.camera problem, rotation just don't work properly in Max 6, or am i doing something terribly wrong?

Rob Ramirez's icon

check out the @locklook attribute of jit.gl.camera. this will enable the old-style camera/lookat control of jit.gl.render.

the rotation problems are due to the fact that the values are converted from euler to quaternions and then back.
you will get less strange results modifying the rotatexyz or rotate attribute if instead of using the attrui, you use a pak object.