We’ll be using “Horizontal”, “Vertical”, “HorizontalTurn”, “VerticalTurn” as the entry names to match the pre-existing keyboard setup for the Left and Right Sticks.Īfter completing the InputManager to include the Xbox One Controller setup, running the scene should automatically work with the controller since we are using the same input names for the dual sticks. There are 10 buttons and 8 axes to configure. Make sure to use the configuration for Buttons and Joystick Axes for each corresponding entry. To use the controller, we go back to the InputManager - similar to the setup covered in Part 9: Configure Input Settings for Camera Controls (Updated Novemto include return values and DPAD Axis Correction)
This is the setup I have for the Xbox One Controller on Windows 10: The Xbox One Controller is automatically recognized by Windows on a wired connection over USB or through a wireless connection using the Xbox Wireless Adapter for Windows previous versions of Windows - we need to make sure that the axis assignments are updated as there is a difference in the configuration.
The setup and programming concept remains the same, we have to be aware that the axis setup actually vary across platforms and in the case of Windows 10 vs. There are several guides, blogs and sites that cover the Xbox 360 controller setup for Unity. The Xbox One controller has slight changes in the button naming convention compared to the Xbox 360 version (which shares setup and usage conventions with other controllers since it has been out for quite some time.) The controller layout is the same but the Xbox 360 Back and Start buttons are now referred to as View and Menu buttons respectively. I’ll be using the Xbox One controller as the development reference – might as well use the same controller platform that is included with the Oculus Rift package. The programming concept is very similar across the controllers, the key differences are with button and axis id assignments.
I use the Xbox One Controller for PC and Xbox One, the NVidia Shield, Nexus and Fire Controllers over Bluetooth for Android Apps and when I get the time to test it out the SteelSeries Nimbus for iOS. There are several dual-stick/controllers available across platforms - unfortunately we are still not at the stage of having a single controller solution. Unity supports several of input devices that simplify into mouse, joystick or keyboard behavior, it gets a bit challenging as the same input device will have varying input configurations across devices (PC, Mobile) and platforms (Windows 10, previous Windows, Linux, Mac, iOS, Android etc.) To disconnect your controller when you’re done playing, go to System Preferences > Bluetooth, and hit the Disconnect button next to Xbox wireless controller.This post follows: Part 10: Creating the CameraRig Control Script If you’re having issues, check out the Settings or Preferences on whatever gaming system you’re playing on, and look for a controller section. Your controller should now be paired with your Mac! Click on the Connect button to the right of that device name. You’ll find a list of nearby devices to connect to, including one called Xbox wireless controller. On your Mac, go to System Preferences > Bluetooth. This means the controller is in pairing mode. The Xbox logo button should start blinking. This button is at the top of your controller, toward the left side. To pair one of these controllers with your Mac, turn the controller on, and press and hold the Pairing button on the device.
Other console controllers can connect to a Mac via Bluetooth as well-we talk about it in our article on ways to improve your Mac gaming experience. To be clear, this section covers the following controllers: This makes wireless pairing possible not just with the Xbox One and Xbox One S/X consoles, but with Windows PCs and Macs as well. The controllers in this section all have one feature in common: Bluetooth connectivity.