Change the aiming system for the default shot #172

Closed
opened 2026-08-30 11:28:21 +00:00 by metaheavens · 1 comment
Owner

when aiming, whether with mouse or touch controls, we should aim for a given point on the space (still using mouse or the joystick). As its now a point and not a direction, it lets the player try to get the fleet's shot converge and not go in parallel. The auto aim when trying to aim for an ennemy vessel should still work

when aiming, whether with mouse or touch controls, we should aim for a given point on the space (still using mouse or the joystick). As its now a point and not a direction, it lets the player try to get the fleet's shot converge and not go in parallel. The auto aim when trying to aim for an ennemy vessel should still work
Author
Owner

Done in 0fad1dd.

Guns now take a POINT. Each hull works out its own heading to it, so the fleet's fire converges there.

  • The mouse already had a place - the cursor's world position - and was flattening it into a bearing from the fleet's centre on the way out, which threw the distance away. It goes across as a point now.
  • A stick reports a heading, so a pushed stick names the point at the guns' own reach along it. Far enough that "everything that way" still reads right, near enough that the fire meets. Touch loses nothing.
  • The auto-aim still works, and is now per hull: the assist cone is measured around each ship's own heading to the point, so a hull that can reach an enemy near the aim bends onto it and one that cannot does not.
  • Range still belongs to the gun, not to the aim. A point beyond reach is fired toward and the bolt falls short; the heading does not bend.
  • The aim guide stops at the point when it is inside reach and marks it with a reticle, rather than running on to full range - a line past the point would be drawing a direction again.

New test_aim_converges.gd covers all six: two hulls 770 apart end up firing 46 degrees apart and both arrive at the point.

Done in 0fad1dd. Guns now take a POINT. Each hull works out its own heading to it, so the fleet's fire converges there. - The mouse already had a place - the cursor's world position - and was flattening it into a bearing from the fleet's centre on the way out, which threw the distance away. It goes across as a point now. - A stick reports a heading, so a pushed stick names the point at the guns' own reach along it. Far enough that "everything that way" still reads right, near enough that the fire meets. Touch loses nothing. - The auto-aim still works, and is now per hull: the assist cone is measured around each ship's own heading to the point, so a hull that can reach an enemy near the aim bends onto it and one that cannot does not. - Range still belongs to the gun, not to the aim. A point beyond reach is fired toward and the bolt falls short; the heading does not bend. - The aim guide stops at the point when it is inside reach and marks it with a reticle, rather than running on to full range - a line past the point would be drawing a direction again. New test_aim_converges.gd covers all six: two hulls 770 apart end up firing 46 degrees apart and both arrive at the point.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#172
No description provided.