WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 05-31-2013, 12:04 PM
Queenss_RA Queenss_RA is offline
Member
 
Join Date: May 2013
Posts: 4
Make camera rotate 360 in either yaw pitch or roll forever

Hi,

So I've been working on this for awhile and can't find a good solution. How can I make the camera spin 360 degrees in either yaw axis, pitch axis or roll axis non-stop and I can stop it and restart it by just pressing the space bar?
Reply With Quote
  #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
Reply

Tags
camera, events, rotation, spinning

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 11:51 PM.


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