Character controls, camera with dead zone, flashlight scale
This commit is contained in:
parent
f307a7ef00
commit
bbc3f0821e
7 changed files with 80 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue