Aim the laser by depth, and ease the aim view

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AJMdB7iuHuLFZM1aBu3GD
This commit is contained in:
Loïc Wisniewski 2026-09-05 09:32:42 +02:00
commit 2239235993
5 changed files with 123 additions and 28 deletions

View file

@ -120,6 +120,12 @@ func _process(delta: float) -> bool:
drag.index = 7
drag.position = Vector2(350, 700)
main._handle_drag(drag)
# The aim view eases to its framing now instead of cutting to it,
# so the drag alone has not moved the camera yet.
if not is_equal_approx(main.get_node("Camera2D").zoom.x, original_zoom):
return _fail_now("the aim zoom jumped instead of easing")
for _step in range(40):
skill._process(0.05)
if main.get_node("Camera2D").zoom.x >= original_zoom:
return _fail_now("long aim did not zoom out")