Hitbox improvements for various amphibious and naval units
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
CollisionOffsetYof at least-0.375is necessary. ACollisionOffsetYof-0.4is 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
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.
Can this be part of the patch on the 22nd? I am here to apply feedback if necessary.