Skip to content

The “Any” object, for any kind of gamepad

Ravbug edited this page Jan 14, 2019 · 1 revision

When you don’t care whether the user is using a Wiimote and Nunchuk, Classic Controller, SIXAXIS, XBox360 controller, Wii Guitar, Wii Drums, or ordinary gamepad, you can use the “Any” object. It also sort-of supports real joysticks, but not really.

By convention, the Nunchuk is assumed to be in your left hand, and the Wiimote in your right, even though that is not necessarily the case.

You can support multiple players by putting a number after “any”, eg. “any1”, “any2”, “any3”, etc. The controllers will be assigned numbers in this order: Wii Remotes (optionally with nunchuks or classic controllers), SIXAXISes, Wii Guitars, Wii Drums, XBox360 controllers, normal joysticks/gamepads.

If you don’t use a number after the “any”, then all controllers together can be used to control it, similar to what happens when you just use “mouse” without a number.

The Joysticks and DPads

Axes By Style

Any.LeftStickX, Any.LeftStickY: The left analog stick on a gamepad, or the only stick on a joystick, or the joystick on a Nunchuk.

Any.RightStickX, Any.RightStickY: The right analog stick on a gamepad. Doesn’t exist on a Wiimote or joystick.

Any.DPadX, Any.DPadY, Any.DPadLeft, Any.DPadRight, Any.DPadUp, Any.DPadDown: The DPad on a gamepad or Wiimote, or the hat switch on a joystick. On a Sixaxis this will be analog.

Any.LeftStickRun: Left analog stick is pushed to run speed. Any.RightStickRun: Right analog stick is pushed to run speed.

Axes By Finger

Any.LeftThumbX, Any.LeftThumbY, Any.LeftThumbLeft, Any.LeftThumbRight, Any.LeftThumbUp, Any.LeftThumbDown: The left analog stick or left DPad or Nunchuk stick. Or the joystick and hat switch on a real joystick.

Any.RightThumbX, Any.RightThumbY, Any.RightThumbRight, Any.RightThumbRight, Any.RightThumbUp, Any.RightThumbDown: The right analog stick or the Wiimote’s DPad.

Axes By Function

Any.X, Any.Y, Any.Left, Any.Right, Any.Up, Any.Down: The left analog stick, nunchuk joystick or DPad.

L3 and R3 Buttons

Any.L3: Pushing in on the left analog stick. This does NOT work on a Classic Controller or Nunchuk, they have no L3 button. It only works on the SIXAXIS, XBox 360 Controller, or regular gamepad. Any.R3: Pushing in on the right analog stick. This does NOT work on a Classic Controller, they have no R3 button. It only works on the SIXAXIS, XBox 360 Controller, or regular gamepad.

The Trigger Buttons

Note that on a Wii Remote, the trigger button is also counted as a normal button. Be careful not to assign it twice. Triggers By Analog/Digital

Any.AnalogLeftTrigger: range 0 to 1. If there is only one left trigger which is analog, it uses that trigger. Otherwise it uses the left trigger with the most range of movement. If there are no analog triggers it will use a digital trigger that feels most analog. = (0..1): Classic.L, Sixaxis.L2, XInput.LeftTrigger, (0/1): Nunchuk.Z, Joystick.L2

Any.AnalogRightTrigger: same as above, but on the right hand side. = (0..1): Classic.R, Sixaxis.R2, XInput.RightTrigger, (0/1): Wiimote.B, Joystick.R2

Any.DigitalLeftTrigger: True/False. The other left trigger besides the “analog” one. This trigger might actually be an analog trigger, in which case it returns true when only partly pressed. = Classic.ZL, XInput.LeftShoulder, Sixaxis.L1, Nunchuk.C, Joystick.L1

Any.DigitalRightTrigger: same as above, but on the right hand side. Doesn’t exist on a wiimote. = (0..1): Classic.ZR, XInput.RightShoulder, Sixaxis.R1, Joystick.R1

Triggers By Quality

Any.LeftTrigger: True/False. The best, most trigger-like, or most commonly used trigger on the left side. If analog, it only needs to be partly pressed to be true. = Classic.L, Sixaxis.L1, XInput.LeftTrigger, Nunchuk.Z, Joystick.L1

Any.RightTrigger: same as above, but on the right hand side. = Classic.R, Sixaxis.R1, XInput.RightTrigger, Wiimote.B, Joystick.R1

Any.WorseLeftTrigger: True/false. The second best trigger on the left side. If analog, it only needs to be partly pressed to be true. = Classic.ZL, Sixaxis.L2, XInput.LeftShoulder, Nunchuk.C, Joystick.L2

Any.WorseRightTrigger: same as above, but on the right. Doesn’t exist on a Wiimote. = classic.ZR, Sixaxis.R2, XInput.RightShoulder, Joystick.R2

Triggers By Position

Any.TopLeftTrigger (aka Any.L1): top left trigger = Sixaxis.L1, Joystick.L1, XInput.LeftShoulder, Nunchuk.C, Classic.L

Any.BottomLeftTrigger (aka Any.L2): = Sixaxis.L2, Joystick.L2, XInput.LeftTrigger, Nunchuk.Z, Classic.ZL

Any.TopRightTrigger (aka Any.R1): = Sixaxis.R1, Joystick.R1, XInput.RightShoulder, Wiimote.B, Classic.R

Any.BottomRightTrigger (aka Any.R2): doesn’t exist on Wiimote. = Sixaxis.R2, Joystick.R2, XInput.RightTrigger, Classic.ZR

Select and Start buttons

Any.Select: True/False. Select, Minus, or Back. = Sixaxis.Select, Joystick.Select, Classic.Minus, Wiimote.Minus, XInput.Back. Any.Start: Start on a SIXAXIS, regular gamepad, or Classic Controller; or Plus on a Wiimote. Start on an XBox360.

Any.Home: Home or PS button. Can’t be read on an Xbox360 controller. Doesn’t exist on a normal gamepad. = Classic.Home, Wiimote.Home, Sixaxis.PS

The main buttons

Note that on a Wiimote, buttons by position are also the same as the DPad, and the cancel button, and button2 are also the same as a right trigger.

Buttons By Function

Any.OK: Wiimote.A, Classic.A, SixAxis.Circle, XInput.A, Joystick.Button1 Any.Cancel: Wiimote.B, Classic.B, Sixaxis.Cross, XInput.Back, Joystick.Button2 Any.OtherButton1: Wiimote.One, Classic.X, Sixaxis.Triangle, XInput.B, Joystick.Button3 Any.OtherButton2: Wiimote.Two, Classic.Y, Sixaxis.Square, XInput.X, Joystick.Button4

Buttons By Position

Any.Triangle: Top button for your right thumb. = Sixaxis.Triangle, Joystick.Triangle, Classic.x, XInput.Y, Wiimote.Up (DPad) Any.Circle: Right button for your right thumb. = Sixaxis.Circle, Joystick.Circle, Classic.a, XInput.B, Wiimote.Right (DPad) Any.Cross: Bottom button for your right thumb. = Sixaxis.Cross, Joystick.Cross, Classic.b, XInput.A, Wiimote.Down (DPad) Any.Square: Left button for your right thumb. = Sixaxis.Square, Joystick.Square, Classic.y, XInput.X, Wiimote.Left (DPad)

Buttons By Number

The buttons numbered in their normal order.

Any.Button1 … Any.Button17

Buttons By Which Finger You Press Them With

Main buttons in their normal order, followed by hard to reach ones.

Any.RightThumbButton1: Wiimote.A, Classic.a, SixAxis.Circle, XInput.A, Joystick.Button1
Any.RightThumbButton2: Wiimote.Minus, Classic.b, SixAxis.Cross, XInput.B, Joystick.Button2
Any.RightThumbButton3: Wiimote.Plus, Classic.x, SixAxis.Triangle, XInput.X, Joystick.Button3
Any.RightThumbButton4: Wiimote.Home, Classic.y, SixAxis.Square, XInput.Y, Joystick.Button4
Any.RightThumbButton5: Wiimote.One, Classic.Plus, SixAxis.Start, XInput.Start, Joystick.Start
Any.RightThumbButton6: Wiimote.Two, Classic.Home, SixAxis.R3, XInput.R3, Joystick.R3
Any.RightThumbButton7: Wiimote.Down, Classic.Minus, SixAxis.PS, XInput.Back, Joystick.Select Any.RightThumbButton8: Wiimote.Left, SixAxis.Select
Any.RightThumbButton9: Wiimote.Right
Any.RightThumbButton10: Wiimote.Up

On the Wiimote, people use their left thumb to press 1 or 2.

Any.LeftThumbButton1: = Sixaxis.Select, Classic.Minus, Joystick.Select, Wiimote.One
Any.LeftThumbButton2: = Sixaxis.L3, Joystick.L3, Classic.Home, Wiimote.Two
Any.LeftThumbButton3: = SixAxis.PS, Wiimote.Minus

Vibration

Any.Rumble (aka Any.Vibration1) and Any.Vibration2 control vibration. They are between -1 and 1, with 0 being no vibration.

Any Motion

Wiimote and Sixaxis have motion controls. Other devices will always report no motion.

See the earlier section “Motion Controls for Wiimote, Nunchuk and Sixaxis” for a list of motion controls that work on the Any object.

Warning: The postures, simple gestures, accelerations, and rotation matricies are not implemented quite right… if you don’t specify a number after any then it will only look at the first Wii Remote or Sixaxis instead of averaging all of them (I was lazy). The Waggle Gestures and Angles work correctly though.

Clone this wiki locally