WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-24-2009, 07:31 AM
Saz Saz is offline
Member
 
Join Date: Nov 2008
Posts: 36
I tried using this code
Code:
def UpdateJoystick1():
    #Get the joystick position
    x,y,z = joy.getPosition()
    
    #Move the viewpoint forward/backward based on y-axis value
    if abs(y) > 0.0001: #Make sure value is above a certain threshold
        viz.MainView.move(0,0,-y*MOVE_SPEED,viz.BODY_ORI)
    #Move the viewpoint left/right based on x-axis value
    if abs(x) > 0.001: #Make sure value is above a certain threshold
        viz.MainView.move(x*0.1,0,0,viz.BODY_ORI)
    #Turn the viewpoint left/right based on twist value
    #if abs(twist) > 0.001: #Make sure value is above a certain threshold
    #    viz.MainView.rotate(0,1,0,twist,viz.BODY_ORI,viz.RELATIVE_WORLD)


#UpdateJoystick every frame
vizact.ontimer(0,UpdateJoystick1)

def MOVE_SPEEDCH():
	MOVE_SPEED=0
vizact.ontimer(22,MOVE_SPEEDCH)
but it still made no difference - I'm sorry I must be coming across as really dense - it's been a long week and it's only Wednesday!
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
How to get the data from Logitech G25 racing wheel ? fuyonggang Vizard 4 12-18-2008 07:14 PM
writing joystick position to a data file Saz Vizard 3 12-17-2008 06:18 AM
Joystick Navigation Vinicius Lima Vizard 7 10-23-2007 11:42 AM
Facetracking and Immersion Joystick Vygreif Vizard 1 01-25-2006 11:56 AM
Basic Joystick Navigation Question Plasma Vizard 2 01-29-2004 08:08 PM


All times are GMT -7. The time now is 03:02 AM.


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