WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 02-04-2018, 11:24 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can apply a reset to the link and remove the operator previously assigned before applying a new one:

Code:
trackerLink.reset(viz.RESET_OPERATORS)
Will the scale be changing as the participant is moving or only between trials? If while moving then it will also be necessary to apply an orientation offset to account for the difference between the scaled orientation value and the raw orientation value. For example the following code adds an offset so the view does not jump when the scale factor is removed:

Code:
rawTracker = vizconnect.getTracker('head_tracker').getRaw()
trackerLink = vizconnect.getTracker('head_tracker').getLink()
trackerLink.scaleEuler([2,1,1],viz.LINK_ORI_OP)

def removeScaleFactor():
	yaw_link = trackerLink.getEuler()[0]
	yaw_raw = rawTracker.getEuler()[0]
	yaw_diff = yaw_link - yaw_raw
	trackerLink.reset(viz.RESET_OPERATORS)
	trackerLink.postEuler([yaw_diff,0,0],viz.LINK_ORI_OP)
	
vizact.onkeydown('1',removeScaleFactor)
The postEuler offset would change each time the scale factor changes.
Reply With Quote
 


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
Change Viewpoint in different scenes lilio Vizard 1 08-28-2009 03:56 PM
Change model alpha and memory leak hosier Vizard 2 06-25-2009 11:55 AM
changing the gain of a joystick during a program Saz Vizard 4 06-25-2009 04:49 AM
How can you dynamically change the gain on a tracker-based CaveView? michaelrepucci Vizard 2 09-23-2008 08:18 AM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 01:14 PM


All times are GMT -7. The time now is 01:41 AM.


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