Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Artanisx opened this issue Jan 21, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request input Related to the Input module.

Comments

@Artanisx
Copy link
Owner

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);
@Artanisx Artanisx added enhancement New feature or request input Related to the Input module. labels Jan 21, 2020
@Artanisx Artanisx self-assigned this Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request input Related to the Input module.
Projects
None yet
Development

No branches or pull requests

1 participant