WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   viewpoint rotate (https://forum.worldviz.com/showthread.php?t=2472)

bionic1 01-24-2010 09:18 PM

viewpoint rotate
 
hi~

i want viewpoint 360degree rotate at same place...

i know 180degree..

view = viz.mainview
euler = view.getEuler()
view.spinto([0,1,0,euler[0]-180],180)

how to rotate 360 degree at same place...(without any key event)
(view.spinto([0,1,0,euler[0]-360],180) ----> don't rotate...)

Jeff 01-27-2010 09:32 AM

You could do this by linking the viewpoint to a group object which is an empty node and then apply a spin action to the group object. After the spin is complete you could disable the link.
Code:

import viz
import vizact

viz.go()

court = viz.add('court.ive')

group = viz.addGroup()
link = viz.link(group,viz.MainView)

spinAction = vizact.spin(0,1,0,45,8)
group.runAction(spinAction)



All times are GMT -7. The time now is 03:54 PM.

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