changing the gain of a joystick during a program
Hi,
I want to change the gain of the joystick by altering the scalar constant (in this case MOVE_SPEED)- so effectively the speed will alter - at a certain point in my program (22secs in). Here's what I have so far: Code:
def UpdateJoystick1(): Any help - as usual - will be greatly appreciated! |
UpdateJoystick1 is being called every frame. UpdateJoystick2 is only called once after 22 seconds. I don't think you need two different functions here. You could just change the value of MOVE_SPEED after 22 seconds.
|
I tried using this code
Code:
def UpdateJoystick1(): |
You need to declare the MOVE_SPEED variable as global in your MOVE_SPEEDCH function.
Code:
def MOVE_SPEEDCH(): |
Thank you poppet - you're a star - works beautifully!
|
All times are GMT -7. The time now is 09:07 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC