mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 20:05:55 +00:00
Aiming 2.0
This commit is contained in:
parent
fe552608ee
commit
8d2aab985e
6 changed files with 13 additions and 11 deletions
|
|
@ -85,7 +85,8 @@ public partial class KeyboardInputProvider : InputProvider
|
|||
|
||||
public override Vector2 GetAimInput()
|
||||
{
|
||||
Vector2 rightStickInput = GetRightStickInput();
|
||||
// TODO: Make a solution that does not rotate in 2D
|
||||
Vector2 rightStickInput = GetRightStickInput().Rotated(Mathf.DegToRad(-45f));
|
||||
Vector2 mouseInput = GetMouseAimInput();
|
||||
|
||||
// Determine which input method to use
|
||||
|
|
@ -103,10 +104,11 @@ public partial class KeyboardInputProvider : InputProvider
|
|||
|
||||
private Vector2 GetRightStickInput()
|
||||
{
|
||||
return new Vector2(
|
||||
Input.GetAxis(LeftAimName, RightAimName),
|
||||
Input.GetAxis(UpAimName, DownAimName)
|
||||
);
|
||||
return Input.GetVector(LeftAimName, RightAimName, UpAimName, DownAimName);
|
||||
// return new Vector2(
|
||||
// Input.GetAxis(LeftAimName, RightAimName),
|
||||
// Input.GetAxis(UpAimName, DownAimName)
|
||||
// );
|
||||
}
|
||||
|
||||
private Vector2 GetMouseAimInput()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue