|
Hello, I'm making a game where you'll be able to play on a PC or Mac with either an xbox or PS3 controller. I've found different drivers that work with each variation but the problem I have is that the triggers are mapped differently for each driver. Mac with PS3 Controller: The PS3 controller works natively with Mac 10.6 and up so if at all possible I'd like to refrain from having to find a new driver. The problem is the triggers are mapped to "joystick button 8" and "joystick button9" when it should be mapped to an axis. Because of this the value of each trigger can only be either 0 or 1 so it's not pressure sensitive. Mac with xbox Controller I'm using the Tattiebogle driver for the xbox controller on a mac. The triggers are mapped to the 5th and 6th axes. No complaints here. PC with xbox or PS3 controller I'm using the MotionJoy driver for the xbox and PS3 controller on a PC. It's a bitch to get it started compared to the Mac but that's not the real issue. The triggers are both mapped to the 3rd axis. L2 is 0 to 1 and R2 is 0 to -1. This is kind of cool but there's no way of telling if the user is holding down both triggers. I'll probably need to find a new driver for PC but from what I've read MotionJoy is the best. And it sucks IMO. Unity should really have their own drivers download automatically when you download the Unity player.
(comments are locked)
|
|
go to input manager, To see the Input Manager choose: Edit->Project Settings->Input. http://docs.unity3d.com/Documentation/Components/class-InputManager.html http://docs.unity3d.com/Documentation/Manual/Input.html and give to input same name i.e. "Fire1" "Fire2" "Jump" and other are presetting. but you can easily add other increasing size and use it for input Input.GetButtonDown ("Fire1") this should work I know about the Input manager... What I'm saying is the drivers I'm using each have different mappings. so for example the "start" button will be mapped to "joystick button 10" with the Tattiebogle driver but it'll be "joystick button 6" with the MotionJoy driver which is what users must use for PC. I've written a script that chooses which button to assign "start" to based on if you choose Mac/PC and Xbox/PS3 at the start of the game. I had to do this because you can't change anything in the Input manager at runtime for some stupid reason. btw vote for the feedback http://feedback.unity3d.com/unity/all-categories/1/top/active/scripting-expose-input-manager- Now my problem is with the triggers. Mac natively maps L2 and R2 to buttons 8 and 9 when they should be axes, Tattiebogle maps to axes 5 and 6 and MotionJoy maps both to 3rd. L2 being 0 to 1 and R2 being 0 to -1. My question is how do I get the triggers to act consistently? One driver makes them true/false, another maps them separately the way they're supposed to, and the other maps them as one axis so there's no way of telling if both triggers are being held.
Aug 04 '12 at 05:01 AM
commodore
I'm having the same problem with L2/R2 (PC) did you manage to find a solution for this? Thanks in advance!
May 05 at 10:25 PM
neroziros
(comments are locked)
|
