i dont know how far you have it working so here goes how to do it:
the buttons are easiest, go to edit ->project settings -> input, then on the right simply put the controller button you want as alternate input:
- Unbenannt.png (18.66 KiB) Viewed 11862 times
the button numbers are like on this image:
http://wiki.unity3d.com/index.php?title ... Controller
for the cam rotation first right-click the mouse x input and duplicate it, then change type to joystick axis and axis to x axis and maybe sensitiviy to 1 (never over 1! adjust it in the esc-screen or multiply it in the script) and dead zone to 0.1
then do the same with the y axis
for walking, duplicate these and set the axis to 4th and 5th, i named them "Controller Vertical" and "Controller Horizontal"
you should check the invert checkbox on controller y and controller vertical
they dont work yet, you have to grab these inputs in the script.
go on the bottom left to scripts, them open aimscript and search for "mouse x"
you have to add the controller axis so you add
Code: Select all
rotation_x += Input.GetAxis("Controller X") * sensitivity_x;
rotation_y += Input.GetAxis("Controller Y") * sensitivity_x;
beneath the mouse axis lines
and a few lines beneath
Code: Select all
view_rotation_x += Input.GetAxis("Controller X") * sensitivity_x;
view_rotation_y += Input.GetAxis("Controller Y") * sensitivity_x;
for walking, go in FPSInputController.js and replace line 15 with
Code: Select all
var directionVector = new Vector3(Input.GetAxis("Horizontal") + Input.GetAxis("Controller Horizontal"), 0, Input.GetAxis("Vertical") + Input.GetAxis("Controller Vertical"));
save your script files and run the game, it should be working now
running doesnt work like this, maybe map the alternate positive button in horizontal input to a controller button, then you can tab it quickly to run
if you tell me where you want which buttons ill add these to my receiver mod.