Bullets do not originate from the player's gun when leaning and firing from the hip

Issue #474 on hold
Colin Basnett created an issue

Appears to only affect multiplayer environments. This has been in 5.1 at least.

https://youtu.be/eK5rzcocQP4

Comments (5)

  1. Matt Hands

    I would think the lean animation on the pawn mesh is only being played clientside. Projectile spawn on the server, so the server will use its own bone location (muzzle bone probably) to determine where the bullet should be spawned. If correct, we'll need to make the server play the same lean anims.

    I think critical is too high for a bug that's been around for years.

  2. Matt Hands

    I had a quick look at this today and probably not as easy as might have appeared. I don't think there are any lean anims; what we have in ROPawn def props is an array of 8 LeanBones and a corresponding 8 LeanLeftStanding rotators, which must be applied to those bones.Also arrays of 8 rotators for LeanLeftCrouch, LeanRightStanding, etc.

    They are definitely being used as I tested ramping the rotation amounts up in DHPawn def props, with resulting huge lean. The problem is those rotators aren't being used anywhere in UScript, so it must be native code handling the lean, presumably not considering it worth applying to the server too.

    Not only does it effect bullet spawn location, I think if the server isn't making the player lean, the body collision hit points will be out of line between server and clients. I'd guess that if a player leans and you shoot them where they are leaning, they won't take a hit, at least not a real one, as the server's collision is out of alignment with the client. Don't have time to try that now, but will test it tomorrow if no on else does first.

  3. Log in to comment