WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-19-2009, 03:27 PM
whj whj is offline
Member
 
Join Date: Apr 2008
Posts: 60
orientation question

Hello,

Generally I have two ways to control orientation. One is to turn the viewpoint with head, the code would be like:

rot_data = ppt.getEuler()
viz.reset(viz.HEAD_ORI)
viz.rotate(viz.HEAD_ORI, rot_data[0], rot_data[1], rot_data[2])

In this way, the direction I can see is also my moving direction.

The other is to turn the viewpoint with twist value of joystick, the code would be like:
if abs(joy_rot) > 0.2:
angle = ANIMATE_RATE * TURN_SPEED * joy_rot
viz.MainView.rotate(0, 1, 0, angle, viz.HEAD_ORI, viz.RELATIVE_WORLD)

In this way, I can not change orientation by rotating my head.


So my question is, is there any way that I can use the twist value of joystick to control the walking direction while I can still change orientation by rotating my head. In other words, I can use joystick to control navigation while feel free to look around.

Thanks!
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
General question and question regarding arrays dan12345 Vizard 1 01-15-2008 10:15 AM
question about yaw, pitch, roll TunTun Vizard 2 05-23-2007 12:46 PM
(beginner) calculating orientation change with eulers astull Vizard 16 02-22-2007 09:45 AM
intersense orientation jargon Vizard 2 05-14-2005 04:55 PM
to rephrase my question... shai Vizard 2 10-27-2004 10:55 AM


All times are GMT -7. The time now is 02:01 PM.


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