Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the position of the left Xbox 360 Controller stick (thumbstick) as a 2D vector.
Namespace: Microsoft.Xna.Framework.Input
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public Vector2 Left { get; }
Property Value
Two-dimensional vector that identifies the position of the left stick. Each axis is represented as a floating-point value from −1.0 to 1.0.
Remarks
![]() |
---|
You can check GameDefaults.MoveWithRightThumbStick to determine if the player prefers using the right or left thumbstick to control movement. |
Each of the thumbstick axis members is a signed value describing the position of the thumbstick. A value of 0 is centered. Negative values signify down or to the left. Positive values signify up or to the right. The controller typically does not generate thumbstick values within a dead zone, or marginal input region around the center position.
Example
if (GamePad.GetState( PlayerIndex.One ).ThumbSticks.Left.Y == 1.0f)
{
// Player one has pressed the left thumbstick up.
}
See Also
Reference
GamePadThumbSticks Structure
GamePadThumbSticks Members
Microsoft.Xna.Framework.Input Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone