NS-23: allow ground pick on bump slopes (fix stuck departure)
MIN_WALKABLE_NORMAL_DOT_UP 0.82 is stricter than NS-19 frustum slopes (~45° / dot 0.71 on Bump A, ~39° / 0.78 on B). Clicks off the plateau often hit the slope first; the pick was dropped with no MoveCommand. Lower to 0.64 so ramps register; vertical walls remain ~0.pull/23/head
parent
4b9e30c624
commit
725bef1133
|
|
@ -1,14 +1,14 @@
|
||||||
extends Node3D
|
extends Node3D
|
||||||
|
|
||||||
## NS-16: walkable ground ray pick. Emits world target for MoveCommand; camera wired from main.
|
## NS-16: walkable ground ray pick. Emits world target for MoveCommand; camera wired from main.
|
||||||
## NS-19: ignores hits on **steep** surfaces (e.g. pedestal **walls**) so players cannot chain small
|
## NS-19: reject vertical faces (pedestal). Bump slopes ~39–45° (dot UP ~0.71–0.78).
|
||||||
## vertical steps up a vertical face; only **floor-like** normals (high dot with UP) count.
|
## 0.82 rejected slope-first picks when leaving plateau; use 0.64. Walls stay ~0.
|
||||||
## (No `class_name` so headless/CI can load the project before `.godot` import exists.)
|
## (No `class_name` so headless/CI can load the project before `.godot` import exists.)
|
||||||
|
|
||||||
signal target_chosen(world: Vector3)
|
signal target_chosen(world: Vector3)
|
||||||
|
|
||||||
## Minimum `hit_normal.dot(Vector3.UP)` to accept a pick (0 = vertical wall, 1 = flat floor).
|
## Minimum `hit_normal.dot(Vector3.UP)` to accept a pick (0 = vertical wall, 1 = flat floor).
|
||||||
const MIN_WALKABLE_NORMAL_DOT_UP: float = 0.82
|
const MIN_WALKABLE_NORMAL_DOT_UP: float = 0.64
|
||||||
|
|
||||||
## Fallback when `Viewport.get_camera_3d()` is null (e.g. some editor setups). Set from `main.gd`
|
## Fallback when `Viewport.get_camera_3d()` is null (e.g. some editor setups). Set from `main.gd`
|
||||||
## in `_ready`.
|
## in `_ready`.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue