Skip to content

Commit 0935ad2

Browse files
committed
add 4th Yarwin suggestion:
"we are making use of delta (in line 79) therefore it should be delta instead of _delta 😅."
1 parent 4599205 commit 0935ad2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

squash-the-creeps/rust/src/player.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub struct Player {
2929
}
3030
#[godot_api]
3131
impl ICharacterBody3D for Player {
32-
fn physics_process(&mut self, _delta: f64) {
32+
fn physics_process(&mut self, delta: f64) {
3333
let mut direction = Vector3::ZERO;
3434

3535
let input = Input::singleton();
@@ -76,7 +76,7 @@ impl ICharacterBody3D for Player {
7676
// This is necessary for the is_on_floor() function to work as a body can always detect
7777
// the floor, walls, etc. when a collision happens the same frame.
7878
if !self.base().is_on_floor() {
79-
self.target_velocity.y -= self.fall_acceleration * _delta as f32;
79+
self.target_velocity.y -= self.fall_acceleration * delta as f32;
8080
}
8181
// moving the Character
8282
let velocity = self.target_velocity;

0 commit comments

Comments
 (0)