Player icon on map & compass both show wrong rotation when driving a vehicle

Issue #480 resolved
Matt Hands created an issue

Similar cause to https://bitbucket.org/darklightgames/darkesthour/issues/476/player-names-show-up-inconsistently-while crewing vehicles.

HUD often uses controller's rotation, but this goes wrong when player is in a vehicle, which will probably use relative rotation, i.e. bPCRelativeFPRotation=true, meaning the Controller's rotation is relative the the vehicle's rotation. To work effectively, the functionality needs to factor in the vehicle's rotation.

TWI noticed the problem but incorrectly identified the cause. So they only implemented a partial fix, thinking the problem was only vehicle weapon positions (commented "fix for frelled rotation on weapon pawns").

TWI used the controller's saved CalcViewRotation as the fix for weapon pawns, which also fixes it for vehicles and in fact works fine for any pawn. It's a very handy variable, simply saving the last calculated camera rotation, which I've already used to fix the player name problem above. It's just a case of using it all the time in these functions, not just to fix weapon pawns.

Comments (2)

  1. Log in to comment