Skip to content

Add to the Command.cs support for Gamepad analog input for Thumbstick and Triggers #5

@Artanisx

Description

@Artanisx

At the moment the Command.cs module do not support the analog input from Thumbstick and Triggers.

Add this. For example:

// Move Kokichi with thubsitck
float maxSpeed = 10.0f;
Vector2 thumbMove = new Vector2 (newGamepadState.ThumbSticks.Left.X * maxSpeed, newGamepadState.ThumbSticks.Left.Y * maxSpeed * -1.0f);

kokichiPos += thumbMove;

// Use lefttrigger to do change kokichi scale
kokichiScale = newGamepadState.Triggers.Left + 1.0f;

// vibrate left and right rotors with triggers
GamePad.SetVibration(PlayerIndex.One, newGamepadState.Triggers.Left,      newGamepadState.Triggers.Right);

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestinputRelated to the Input module.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions