WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-19-2013, 11:00 AM
mape2k mape2k is offline
Member
 
Join Date: Mar 2013
Posts: 60
Varying rotation speed with spinTo

Hello,

I am using the spinTo command in a for loop to spin to different view angles during an experiment. I want the rotation speed to be constant, independent from the actual and desired view angle.
However, the spinTo command gives me different rotation speeds when I use it. Sometimes its faster, and sometimes its slower, even though I specify a constant speed angle.

I have attached a working minimum example. Here, the speed will vary, seemingly at random.

Code:
import viztask
import viz
import vizact

angles = [-120,150,100,150,-170,50,90,150]

viz.addChild('piazza.osgb')
view=viz.MainView

def run():
	
	for k in angles:
		print str(k)
		yield viztask.waitKeyDown(' ')
		yield viztask.addAction(view, vizact.spinTo(euler=[k,0,0],speed=80,interpolate = vizact.linear))

viztask.schedule(run())
viz.go()
Thank you for your help in advance!
Reply With Quote
 

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
Custom Joystick Rotation mhead10 Vizard 9 11-26-2012 12:06 PM
random speed and associated coding Saz Vizard 1 05-20-2010 04:03 AM
set bone rotation - cal3d munteanu24d Vizard 0 03-23-2010 04:25 AM
Unable to perform 360 rotation using vizact.spinto vijaykiran Vizard 2 09-29-2009 08:39 AM
Calculating Speed with sensor durf Vizard 1 03-13-2009 10:25 AM


All times are GMT -7. The time now is 11:23 AM.


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