From 88db434420e60b67423ed778bb958b234bc00d6d Mon Sep 17 00:00:00 2001 From: cmod31 Date: Fri, 27 Jan 2023 09:54:22 +0100 Subject: [PATCH] * delta --- src/player.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/player.cs b/src/player.cs index 9515df2..0add232 100644 --- a/src/player.cs +++ b/src/player.cs @@ -31,8 +31,8 @@ public partial class player : CharacterBody3D if(gpCamVector != Vector2.Zero) { Vector3 camRot = GetNode("camera_center").RotationDegrees; - camRot.y -= gpCamVector.x * camSensitivity * 500 * (float)delta; - camRot.x -= gpCamVector.y * camSensitivity * 500 * (float)delta; + camRot.y -= gpCamVector.x * camSensitivity * (float)delta * 500; + camRot.x -= gpCamVector.y * camSensitivity * (float)delta * 500; camRot.x = Mathf.Clamp(camRot.x, minCamPitch, maxCamPitch); //prevents camera from going endlessly around the player GetNode("camera_center").RotationDegrees = camRot; } @@ -51,8 +51,8 @@ public partial class player : CharacterBody3D direction = new Vector3(inputDir.x, 0, inputDir.y).Rotated(Vector3.Up, GetNode("camera_center").Rotation.y).Normalized(); //rotates the input direction with camera rotation if (direction != Vector3.Zero && Input.MouseMode == Input.MouseModeEnum.Captured | gamepadMode) { - velocity.x = direction.x * speed; - velocity.z = direction.z * speed; + velocity.x = direction.x * speed * (float)delta * 60; + velocity.z = direction.z * speed * (float)delta * 60; } else {