ani fixed

This commit is contained in:
Nicholas Butzke
2026-08-10 12:17:59 -04:00
parent 9358746582
commit 833e936bcd
10 changed files with 554 additions and 23 deletions
+4
View File
@@ -42,6 +42,7 @@ var is_grapple_shooting: bool = false
# ── State tracking ────────────────────────────────────────────────────────────
var wall_normal: Vector3 = Vector3.ZERO
var wall_contact_point: Vector3 = Vector3.ZERO
var wall_side: float = 0.0 # -1 left, +1 right, 0 none
var on_ground: bool = false
var last_ground_time: float = 0.0
@@ -268,6 +269,7 @@ func detect_wall_horizontal() -> Vector3:
# Wall must be roughly vertical (normal mostly horizontal)
if abs(n.y) < 0.3 and n.length_squared() > 0.0:
wall_normal = n.normalized()
wall_contact_point = hit.get("position", origin)
wall_side = side_data["side"]
return wall_normal
@@ -288,10 +290,12 @@ func detect_wall_horizontal() -> Vector3:
var n: Vector3 = hit.get("normal", Vector3.ZERO)
if abs(n.y) < 0.3 and n.length_squared() > 0.0:
wall_normal = n.normalized()
wall_contact_point = hit.get("position", origin)
wall_side = side_data["side"]
return wall_normal
wall_normal = Vector3.ZERO
wall_contact_point = Vector3.ZERO
wall_side = 0.0
return Vector3.ZERO