Proper input layering with console

This commit is contained in:
2025-03-18 01:25:09 +02:00
parent 19cda04372
commit e564cf36a8
6 changed files with 113 additions and 51 deletions

View File

@@ -26,8 +26,8 @@ public class CameraMovement : Script
Actor rootActor = Actor.GetChild(0);
Camera camera = rootActor.GetChild<Camera>();
float xAxis = InputManager.GetAxisRaw("Mouse X");
float yAxis = InputManager.GetAxisRaw("Mouse Y");
float xAxis = Input.GetAxisRaw("Mouse X");
float yAxis = Input.GetAxisRaw("Mouse Y");
if (xAxis != 0.0f || yAxis != 0.0f)
{
viewPitch += yAxis;
@@ -40,8 +40,8 @@ public class CameraMovement : Script
camera.Orientation = Quaternion.Euler(viewPitch, viewYaw, viewRoll);
}
float inputH = InputManager.GetAxis("Horizontal");
float inputV = InputManager.GetAxis("Vertical");
float inputH = Input.GetAxis("Horizontal");
float inputV = Input.GetAxis("Vertical");
Float3 move = new Float3(inputH, 0.0f, inputV);
if (!move.IsZero)