ajout des graines procédurales et des cinamatiques
This commit is contained in:
@@ -6,7 +6,7 @@ const POINTER_ACTION_TEXTURE = preload("res://common/icons/hand-stop.svg")
|
||||
|
||||
@export var pointer_texture_rect : TextureRect
|
||||
|
||||
const SPEED = 4.0
|
||||
@export var speed := 4.0
|
||||
const MOUSE_SENSIVITY = 0.002
|
||||
const RAY_LENGTH = 10.
|
||||
|
||||
@@ -53,11 +53,11 @@ func _physics_process(delta):
|
||||
input_dir.y = -1
|
||||
var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
|
||||
if direction:
|
||||
velocity.x = direction.x * SPEED
|
||||
velocity.z = direction.z * SPEED
|
||||
velocity.x = direction.x * speed
|
||||
velocity.z = direction.z * speed
|
||||
else:
|
||||
velocity.x = move_toward(velocity.x, 0, SPEED)
|
||||
velocity.z = move_toward(velocity.z, 0, SPEED)
|
||||
velocity.x = move_toward(velocity.x, 0, speed)
|
||||
velocity.z = move_toward(velocity.z, 0, speed)
|
||||
|
||||
move_and_slide()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user