View Full Version : How do i map mouse cursor to 360 gamepad
11-06-2009, 07:31 PM
Like the title says, i'd like to control the cursor with the 360 gamepad, i've entered these lines in the input.ini file but it won't work:
Bindings=(Name="XboxTypeS_RightX",Command="Count bXAxis | Axis aMouseX Speed=1.2")
Bindings=(Name="XboxTypeS_RightY",Command="Count bXAxis | Axis aMouseY Speed=1.2")
What am i doing wrong ?
01-26-2010, 11:42 PM
Better late than never, I suppose...but I'm not sure it's understood what you're trying to achieve, or what your difficulty is. "I'd like to control the cursor..." Well, there's no 'cursor', per se, in the game, and I can already control the Pawn in UTGame with my XBox controller.
If you need to read the controller input in your UnrealScript, look to these items within PlayerController (or your subclass of it):
Left thumbstick: RawJoyUp, RawJoyRight
Right Thumbstick: RawJoyLookUp, RawJoyLookRight
these will each range from -1 to 1. I'm working on a dual thumbstick shooter (a la Geometry Wars, Everyday Shooter) and I do the following to control it:
local vector gamePadVector;
gamePadVector.X = -PlayerInput.RawJoyLookRight;
gamePadVector.Y = -PlayerInput.RawJoyLookUp;
ViewRotation = Rotator(gamePadVector);
//Movement (ok, so I use aStrafe and aForward...it works the same)
NewAccel.X = -PlayerInput.aStrafe;
NewAccel.Y = PlayerInput.aForward;
NewAccel.Z = 0;
NewAccel = Pawn.AccelRate * Normal(NewAccel);
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.