mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-13 08:15:54 +00:00
Better free movement
This commit is contained in:
parent
90d2a95fa8
commit
388747ccb3
7 changed files with 108 additions and 15 deletions
|
|
@ -8,4 +8,24 @@ public partial class KeyboardInputProvider : InputProvider
|
|||
{
|
||||
return Input.GetVector("left", "right", "up", "down");
|
||||
}
|
||||
|
||||
public override Vector2 GetAimInput()
|
||||
{
|
||||
var rightStickInput = GetRightStickInput();
|
||||
|
||||
return GetRightStickInput();
|
||||
}
|
||||
|
||||
private Vector2 GetRightStickInput()
|
||||
{
|
||||
return new Vector2(
|
||||
Input.GetAxis("aim_left","aim_right"),
|
||||
Input.GetAxis("aim_up", "aim_down")
|
||||
);
|
||||
}
|
||||
|
||||
public override bool GetStrafing()
|
||||
{
|
||||
return Input.IsActionPressed("strafe");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue