Fix megami box

This commit is contained in:
2023-09-06 19:51:25 -07:00
parent 41adf908a5
commit 7733032397
8 changed files with 21 additions and 17 deletions

View File

@@ -50,6 +50,8 @@ public partial class Character : CharacterBody3D
var inputDir = Input.GetVector(OwnerPlayer.PlayerInput.Left(), OwnerPlayer.PlayerInput.Right(), OwnerPlayer.PlayerInput.Up(), OwnerPlayer.PlayerInput.Down());
var direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
direction = new Vector3(direction.X, 0, direction.Z);
if (direction != Vector3.Zero)
{
velocity.X = direction.X * _speed;