Wire client VTOL/arc HUD & inputs and add Cut 3a tests
This commit is contained in:
parent
95bbca6499
commit
eb579a6ede
10 changed files with 552 additions and 86 deletions
|
|
@ -108,8 +108,8 @@ public partial class Main : Node3D
|
|||
_cameraYaw -= mm.Relative.X * 0.0028f;
|
||||
_cameraPitch = Math.Clamp(
|
||||
_cameraPitch + mm.Relative.Y * 0.0024f,
|
||||
Mathf.DegToRad(-18f),
|
||||
Mathf.DegToRad(38f));
|
||||
Mathf.DegToRad(-78f),
|
||||
Mathf.DegToRad(45f));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -211,7 +211,12 @@ public partial class Main : Node3D
|
|||
if (Input.IsKeyPressed(Key.D) || Input.IsKeyPressed(Key.Right)) steer += 1f;
|
||||
if (Input.IsKeyPressed(Key.A) || Input.IsKeyPressed(Key.Left)) steer -= 1f;
|
||||
|
||||
bool brake = Input.IsKeyPressed(Key.Space);
|
||||
bool isVtol = Session.State.Player.Grid.Spec.IsVtol;
|
||||
float verticalThrottle = 0f;
|
||||
if (Input.IsKeyPressed(Key.Space)) verticalThrottle += 1f;
|
||||
if (Input.IsKeyPressed(Key.C) || Input.IsKeyPressed(Key.Ctrl)) verticalThrottle -= 1f;
|
||||
|
||||
bool brake = isVtol ? Input.IsKeyPressed(Key.Shift) : Input.IsKeyPressed(Key.Space);
|
||||
bool pointerOnHud = Input.MouseMode != Input.MouseModeEnum.Captured &&
|
||||
_hud.IsPointerOverInteractiveHud(GetViewport().GetMousePosition());
|
||||
bool fire = !pointerOnHud && Input.IsMouseButtonPressed(MouseButton.Left);
|
||||
|
|
@ -225,7 +230,8 @@ public partial class Main : Node3D
|
|||
Fire: fire,
|
||||
InteractPickup: _interactQueued,
|
||||
Brake: brake,
|
||||
AimWorldY: aimY);
|
||||
AimWorldY: aimY,
|
||||
VerticalThrottle: verticalThrottle);
|
||||
}
|
||||
|
||||
private (float AimX, float AimY, float AimZ) ComputeCenterScreenAim()
|
||||
|
|
|
|||
Loading…
Reference in a new issue