Description
The RightStickY
field represents the Y-axis of the right analog stick on a game controller. It is part of the InputAnalog
enumeration, which is used to handle analog input values in the range of -1 to 1, with 0 being the default or neutral position.
Usage
Use InputAnalog.RightStickY
to access the vertical movement of the right analog stick. This can be useful for controlling camera pitch, character look direction, or any other functionality that requires vertical analog input.
Example
// Example of using RightStickY to control camera pitch
float pitch = Input.GetAnalogValue(InputAnalog.RightStickY);
// Apply the pitch value to a camera rotation function
Camera.RotatePitch(pitch * sensitivity);