Add hitboxes to other enemies, move enemy database to floor level, normalize strafing input to avoid extra speed gained by moving and strafing

This commit is contained in:
2025-02-07 03:11:32 -08:00
parent b8e5794d48
commit 1f9c05c0a7
26 changed files with 97 additions and 106 deletions

View File

@@ -0,0 +1 @@
uid://6xoiq6pmxkcu

View File

@@ -201,7 +201,7 @@ public partial class Player : CharacterBody3D, IPlayer
var transform = Transform;
transform.Basis = new Basis(Vector3.Up, Settings.RotationSpeed * -rawInput.X * delta) * transform.Basis;
var moveDirection = new Vector3(strafeRightInput - strafeLeftInput, 0, rawInput.Z);
var moveDirection = new Vector3(strafeRightInput - strafeLeftInput, 0, rawInput.Z).Normalized();
var velocity = Basis * moveDirection * Settings.MoveSpeed * Settings.Acceleration;
_knockbackStrength = _knockbackStrength * 0.9f;
Transform = Transform with { Basis = transform.Basis };

View File

@@ -0,0 +1 @@
uid://ds6nlnay5d6cv