WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Manipulating Tracker View (https://forum.worldviz.com/showthread.php?t=1362)

Micha 02-25-2008 07:47 AM

Manipulating Tracker View
 
Hi There,

I use an Ascension FOB and I want to change the main view, i.g. rotate around the z-axis, so that the view for example looks always 90 deg rotated to the actual tracking view.

Any Ideas?

Thanks, Mike

Micha 02-25-2008 08:50 AM

Ok, I got it!

Code:

data = tracker.get()

        view = viz.get(viz.MAIN_VIEWPOINT)
       
        view.reset(viz.BODY_ORI)
       
view.setEuler(data[3]+180,data[4],data[5], viz.BODY_ORI, viz.ABS_LOCAL)


farshizzo 02-25-2008 10:00 AM

You can also use a link to have Vizard automatically perform this operation for you. Example:
Code:

headLink = viz.link(tracker,viz.MainView,dstFlag=viz.LINK_BODY)
headLink.postEuler([180,0,0],target=viz.LINK_ORI_OP)


Micha 02-25-2008 10:05 AM

Nice, thank you very much, works perfectly!!

Cheers Mike


All times are GMT -7. The time now is 09:37 PM.

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