fa icon indicating copy to clipboard operation
fa copied to clipboard

Hitbox improvements for various amphibious and naval units

Open Basilisk3 opened this issue 1 year ago • 1 comments

Description of the proposed changes

#6360 fixed various units being able to evade torpedoes due to a too shallow hitbox. This was done by increasing the part of the hitbox that is underwater, while the above-water hitbox was usually kept at the same size. To accomplish this, the CollisionOffsetY was changed from around -0.25 to -0.375, and the SizeY of the hitbox was increased, so the above-water size of the hitbox remains unchanged.

Unfortunately, this made a targeting bug rear its head, which caused a few weapons to miss some of the units that were changed in the PR. This was unexpected since the above-water hitbox was usually kept exactly the same (e.g., the Cooper). I assume this is an engine bug.

The goals of this PR:

  • Ensuring that lasers and other weapons no longer shoot over shorter units.
  • Ensuring that torpedoes can hit units reliably.

Stat changes

  • Added targeting bones to a wide range of units, like the Shard, Cooper and various sonars.
  • Increased the depth of various hitboxes to prevent torpedoes missing.
  • Miscellaneous hitbox improvements.

Unfixed units

  • Vesper (lasers missing when surfaced): needs an "Abovetgt" target bone like the UEF Tech 2 Sonar.
  • Salem: it is amphibious
  • Cybran Tech 2 and Tech 3 engineers: would need an "Abovetgt" target bone or a higher hitbox.

No changes required

  • Neptune Class: T3 Battlecruiser
  • Tech 3 Battleships
  • Atlantis: Experimental Aircraft Carrier

Additional context

  • For torpedoes to be able to hit naval units properly, a CollisionOffsetY of at least -0.375 is necessary. A CollisionOffsetY of -0.4 is guaranteed to fix the issue and prevents the last very rare misses that occur with -0.375.

Checklist

  • [x] Changes are documented in the changelog for the next game version

Basilisk3 avatar Aug 06 '24 15:08 Basilisk3

I think this PR is ready. It is unfortunate that the Vesper and Cybran Tech 2 and Tech 3 engineers cannot be fixed without the addition of target bones, but that can be tackled at a later date.

Basilisk3 avatar Oct 12 '24 16:10 Basilisk3

Can this be part of the patch on the 22nd? I am here to apply feedback if necessary.

Basilisk3 avatar Nov 18 '24 17:11 Basilisk3