ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
676 stars 204 forks source link

Recon/supp comms fail to fire beamlasers at point blank #4310

Open Arch-Shaman opened 3 years ago

Arch-Shaman commented 3 years ago

image

This is a model issue that recently came up when Pootis tries to run away from a transport in a fw game. Since FW comm laser is pretty much unchanged from base game, it's probably possible to encounter this in base game too.

Moving the piece is probably a fix here.

sprunk commented 3 years ago

From the other ticket: recon too. https://streamable.com/xplq76 (https://zero-k.info/Battles/Detail/1152491 close to the end)

sprunk commented 3 years ago

"Moving the piece" is a fix but is not trivial because for both Recon and Engineer the gun is just a very long rifle that would be very awkward to hold in a way that both looks sane and keeps the barrel near the thorax.

Anarchid commented 3 years ago

"Moving the piece" is a fix but is not trivial because for both Recon and Engineer the gun is just a very long rifle that would be very awkward to hold in a way that both looks sane and keeps the barrel near the thorax.

Hiring SteelBlue to give commanders gangsta grip for CQB would work.

GoogleFrog commented 3 years ago

Support used to not be able to fire at nearby Fleas because aiming down would clip the end of its gun into terrain. I "fixed" it by doing a very ugly piece.Move on the end of the gun based on aiming pitch. I guess a similar thing is required behind a check for target distance?

Basically, these models have unsafe physical properties so create all these edge cases.

SteelBlueZK commented 3 years ago

IMG_20210720_195944172 IMG_20210720_200006795 IMG_20210720_200412023

As seen above, a part of the unstable properties of these models is when the fire point for the default com weapon ends up past the midpoint of the target the engine fails to point the beam in the direction of the Target's mid point. I've checked some other weapons- Particle beam: off and away. Flamer: inverts and hits. Machine gun: hits. Missile launcher: hits. Lightning gun: hits. Shotgun: hits

Looks like beam weapons in the engine have a bug when the Target's aim point is closer to the weapon's aimfromweapon than the weapon's firefrompoint in xyz space, and when this condition is met the Ray of the beam weapon is inverted. Adding an absolute value to a critical value check might be the fix to this bug.

SteelBlueZK commented 3 years ago

IMG_20210720_202540174

Also I recommend making recon Commander aim from the head so it points it's weapon a bit more downwards at most close things. Bonus: a beam Lazer originating inside an enemy colvolume hits it.

SteelBlueZK commented 2 years ago

https://github.com/ZeroK-RTS/Zero-K/pull/4717 contains a fix for this issue on CQC recon comanders on slopes(with a free rider) image