WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Rotation of MainView by a certain angle without use of on.keydown (https://forum.worldviz.com/showthread.php?t=6143)

groot 05-21-2018 08:48 PM

Rotation of MainView by a certain angle without use of on.keydown
 
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:
HTML 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?


All times are GMT -7. The time now is 08:10 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC