mirror of
https://github.com/Steffo99/cinnos.git
synced 2024-11-22 08:04:20 +00:00
Delta
This commit is contained in:
parent
d80caa306f
commit
d465676cc4
2 changed files with 5 additions and 3 deletions
|
@ -33,13 +33,13 @@ func _physics_process(delta):
|
|||
do_jump()
|
||||
|
||||
# Applica gravità
|
||||
velocity += gravity_accel
|
||||
velocity += gravity_accel * delta
|
||||
|
||||
# Applica input
|
||||
var input_dir = Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
var input_change = input_dir * input_accel
|
||||
velocity.x += input_change.x
|
||||
velocity.z += input_change.y
|
||||
velocity.x += input_change.x * delta
|
||||
velocity.z += input_change.y * delta
|
||||
|
||||
print(velocity)
|
||||
|
||||
|
|
|
@ -59,3 +59,5 @@ shape = SubResource("BoxShape3D_2bm1d")
|
|||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.955149, 0.296125, 0, -0.296125, 0.955149, 0, 2.66196, 3.33182)
|
||||
|
||||
[node name="Timer" type="Node" parent="."]
|
||||
|
|
Loading…
Reference in a new issue