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:
1
src/player/IPlayer.cs.uid
Normal file
1
src/player/IPlayer.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://6xoiq6pmxkcu
|
||||
@@ -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 };
|
||||
|
||||
1
src/player/PlayerStats.cs.uid
Normal file
1
src/player/PlayerStats.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://ds6nlnay5d6cv
|
||||
Reference in New Issue
Block a user