PDA

View Full Version : Rotation of MainView by a certain angle without use of on.keydown


groot
05-21-2018, 09:48 PM
I have tried vizact.spin and vizact.spinTo for this, but they only move to fixed angles relative to the original viewpoint.
eg. below is the least buggy code:

turnRight = vizact.spinTo(euler=[90,0,0], speed=50)
turnLeft = vizact.spinTo(euler=[-90,0,0], speed=50)
if "left" in command:
viz.MainView.add(turnLeft)
elif "right" in command:
viz.MainView.add(turnRight)


However, if I am initially facing North, "left" would turn the MainView to West. After that, the command "right" would turn MainView to the East, instead of what we want, North.

Could someone advise me on what to do? Thanks!

Jeff
05-29-2018, 12:13 PM
I'll check with a developer about this and get back to you.

Jeff
05-30-2018, 04:20 PM
Are you setting this up for a system with position tracking?