View Single Post
  #2  
Old 01-30-2004, 10:08 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Is this question related to the post about joystick navigation? I'm not exactly sure what you are asking. If you are wanting the joystick navigation to only move the user in the x-z plane then this is very simple to do. Simply replace the following code of your joystick navigation:
Code:
if abs(y) > 0.2:
	viz.move(0,0,-y*0.1)
if abs(x) > 0.2:
	viz.move(x*0.1,0,0)
to:
Code:
if abs(y) > 0.2:
	viz.move(0,0,-y*0.1,viz.BODY_ORI)
if abs(x) > 0.2:
	viz.move(x*0.1,0,0,viz.BODY_ORI)
This just makes you move relative to your body orientation, which is always level with the x-z plane, unless you manually added a pitch to the body orientation. Hope this helps!
Reply With Quote