WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-24-2008, 08:51 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
RE: Right answer, wrong question!

Thanks for the suggestion, it works really well. Unfortunately I posted the question when I was half asleep, so I apologies for the fact that I will now have to ask you a revised question. I actually need to be able to dismount the the truck and move around. I control the truck with a joypad with the head ori of the view set to mouselook and envisage controlling the view in the same way when I dismount. Here's the joypad script I'm using to drive the FLT:

Code:
#Use joystick to control FLT navigation
def UpdateMovement():
    
    #Get the joystick position
    x,y,z = joy.getPosition()
    
    #Get the twist of the joystick
    twist = joy.getTwist()
        
    #Using the z value off the twist control for up and down
    if abs(y) > 0.3 or abs(y) < -0.3:
        SetThrottle(-y)
        
    if abs(y) <0.3 and abs(y) >-0.3:
        SetThrottle(0)
    
    if abs(twist) > 0.2 or abs(twist) < -0.2:
        steer(twist*70)
        steerWheel(-twist*65)
    
    elif abs(twist) < 0.2 or abs(twist) > -0.2:
        steer(0)
        steerWheel(0)

#UpdateJoystick every frame
vizact.ontimer(viz.FASTEST_EXPIRATION,UpdateMovement)
So what I think I am asking is how do I mount and dismount from the truck while using the same controls to manipulate the main view.

Thanks for your patience,

Nige
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
Stereo Overlap question JMOwens Vizard 2 01-08-2008 08:54 AM
viztask question asimbh Vizard 1 11-20-2007 09:12 AM
Another color question mjabon Vizard 4 07-31-2007 03:04 PM
Basic Joystick Navigation Question Plasma Vizard 2 01-29-2004 07:08 PM


All times are GMT -7. The time now is 04:51 AM.


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