NS-23: Document idle skip vs is_on_floor / move_and_slide
parent
8fe70a75de
commit
8956545d3c
|
|
@ -58,6 +58,8 @@ func _set_horizontal_velocity_toward(point: Vector3) -> void:
|
||||||
velocity.y = 0.0
|
velocity.y = 0.0
|
||||||
|
|
||||||
|
|
||||||
|
## `is_on_floor()` comes from the last `move_and_slide()`. Skipping slide while idle reuses that
|
||||||
|
## stale floor state — OK for static floors; revisit if walkable geometry moves.
|
||||||
func _skip_move_when_idle_on_floor() -> bool:
|
func _skip_move_when_idle_on_floor() -> bool:
|
||||||
return is_on_floor() and velocity.length_squared() < 1e-12
|
return is_on_floor() and velocity.length_squared() < 1e-12
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue