WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-10-2013, 04:06 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Here's an example:
Code:
import viz
import vizact

viz.go()

viz.add('piazza.osgb')

viewNode = viz.addGroup()
viewLink = viz.link(viewNode, viz.MainView)
viewNode.setPosition([0,2,0])
spinAction = vizact.spin(0,1,0,20,viz.FOREVER)

viewNode.addAction(spinAction)

def pauseAndRestart():
	if viewNode.getAction():
		viewNode.clearActions()
	else:
		viewNode.setEuler([0,0,0])
		viewNode.addAction(spinAction)

vizact.onkeydown(' ', pauseAndRestart)
Reply With Quote
 

Tags
camera, events, rotation, spinning


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
rotate camera about an object dwaik Vizard 2 02-09-2010 01:06 AM
The problem of tracker using via VRPN _kj_ Vizard 2 08-13-2009 12:03 AM
question about yaw, pitch, roll TunTun Vizard 2 05-23-2007 12:46 PM


All times are GMT -7. The time now is 03:24 AM.


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