Smoother movement feel, plus landing/wrap sounds and splat particles #4

Merged
SnekInAScarf merged 5 commits from movement-feel into main 2026-10-31 20:47:34 -05:00
Showing only changes of commit c212748b8d - Show all commits

View file

@ -383,7 +383,11 @@ func _find_edge_corner(normal: Vector2, dir: Vector2, reach: float) -> Variant:
var line: Vector2 = surfaceHit.position - normal * 2 + dir * (pos - surfaceHit.position).dot(dir)
var faceHit := _cast_ray(line + dir * reach, line - dir * radius)
if not faceHit or faceHit.normal.dot(dir) < 0.5: return null
return faceHit.position + normal * 2
var corner: Vector2 = faceHit.position + normal * 2
# A real edge has empty space just past it, behind the surface. Seams
# between tiles (and the foot of a wall) have solid there, so they're not edges.
if not _is_point_free(corner + dir * 2 - normal * 2): return null
return corner
# If this frame's movement along the surface would take us past its edge, stop
# at the edge instead, until we've held towards it for MAX_SECS_TO_UNSTICK.