Anybody help with rotate the viewport, please!
Hi all, I am trying to make a script to rotate the viewport to the left (like pressing Alt+MiddleButton+mouse movement).
I am testing this and I linked the script to one key like "left arrow":
(
theAxis = (viewport.setTM()).row3
(
viewport.rotate (quat -4 theAxis)
completeredraw()
)
)
Like in the MAX reference it works but, is there any way to make it rotate from the selection instead from the world coordinates?
I am trying to do an "Orbit sub-object" but instead of using the mouse I would like to use a key, in this case "left arrow".
I am experimenting with a joystick to manipulate the views and it is fine, it works using Autohotkeys to send keystrokes from a joystick but I wonder how devices like "3dconnecxion" communicate with MAX to make the viewport rotate as I can't see anywhere another method of controlling MAX apart from mouse.
Thanks a lot for your help!!
Comments
( theAxis =
(
theAxis = (viewport.GetTM()).row3
(
viewport.rotate (quat -4 theAxis) CENTER:[120,060,0]
completeredraw()
)
)
but does it work? odd results here