Game Development Community

Joystick POV

by Adam Beer · in Torque Game Engine Advanced · 12/19/2008 (7:30 am) · 3 replies

I am wondering if anyone has got a joysticks POV hat working properly? I have the binds setup and working, but I dont know how you would rotate the cam on a vehicle with no mounted player.

#1
12/19/2008 (9:52 am)
Sure, although I don't know how it works on different joysticks. I'm sure you remember the throttle lever working on one end but not the other. This probably isn't an exception.

xpov
ypov
upov
dpov
lpov
rpov
xpov2
ypov2
upov2
dpov2
lpov2
rpov2

I've used the first ones (those without a number) with great success. Input is given as usual trough the -1 to +1 range, I believe.
#2
12/19/2008 (9:55 am)
I did manage to get the binds to echo using xpov, ypov, etc. but the actual functions to rotate the camera using the POV hat I wasnt able to figure out.
#3
12/19/2008 (11:05 am)
It's because you're using the cam node to create a camera matrix. You'd have to setup different nodes for different angles, which is a bit more work if you have lots of assets, or you'd use a camera system which offsets the camera and rotates it, which can make for some nice transitions and so forth.

I'll email you in a moment.