Character controls, camera with dead zone, flashlight scale

This commit is contained in:
Иван Кузьменко 2023-08-16 01:20:28 +03:00
parent f307a7ef00
commit bbc3f0821e
7 changed files with 80 additions and 4 deletions

View file

@ -19,7 +19,7 @@ public partial class Player : CharacterBody2D
// Get the input direction and handle the movement/deceleration.
// As good practice, you should replace UI actions with custom gameplay actions.
Vector2 direction = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down");
Vector2 direction = Input.GetVector("character_left", "character_right", "character_up", "character_down");
if (direction != Vector2.Zero)
{
velocity.X = direction.X * Speed;