ajout d'une gui en 3d, d'un tuto et correction de bug à la pelletée
This commit is contained in:
@@ -38,6 +38,8 @@ func _physics_process(delta):
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
var input_dir = Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
if Input.is_action_pressed("move_pointer"):
|
||||
input_dir.y = -1
|
||||
var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
if direction:
|
||||
velocity.x = direction.x * SPEED
|
||||
|
||||
Reference in New Issue
Block a user