WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-18-2012, 11:40 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You should be able to use a single preEuler operator to reset the pitch to zero. The following sample code demonstrates how to reset the pitch during runtime. It will take the current raw euler values from the tracker and apply the inverse pitch to a preEuler operator.
Code:
import viz
import vizact
viz.go()

viz.add('maze.osgb')

tracker = viz.add('testtrack_ori.dls')
view_link = viz.link(tracker,viz.MainView)
pitch_reset = view_link.preEuler([0,0,0],target=viz.LINK_ORI_OP)

def ResetPitch():
	yaw,pitch,roll = tracker.getEuler()
	pitch_reset.setEuler([0,-pitch,0])

vizact.onkeydown('r',ResetPitch)
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
Coordinate system flips when pitch crosses 90deg? bernie Vizard 6 04-15-2010 05:31 PM
reset intersense not working billjarrold Vizard 9 03-31-2010 09:53 PM
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
Pitch Question nickyee Vizard 1 07-14-2004 10:07 AM


All times are GMT -7. The time now is 12:46 AM.


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