PDA

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


groot
05-21-2018, 08: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, 11:13 AM
I'll check with a developer about this and get back to you.

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