View transitions in any vehicle jerk the driver's view forwards & then back again afterwards

Issue #269 resolved
Matt Hands created an issue

Problem

In any vehicle you may be looking sideways or even backwards over your shoulder, but when you mousewheel to do a view transition the view instantly snaps to face forwards. Any sudden view snap is never ideal.

But what's worse is that after the transition the view suddenly snaps back to where you were facing. That feels really wrong.

And the game is actually capturing any mouse movements during the transition, so when it ends the view snap can take you to a completely different direction. That can feel like completely random camera movement.

Here is a video showing the problem in the US halftrack.

Desired

As a minimum, the view lock should be made optional, as it is in tank cannons. I would turn it off, as I think it's ok & realistic for the player to remain facing sideways while he does simple thinks like open a visor or hatch. Avoiding the sudden view snap preserves immersion.

But if it is enabled for any vehicles, it would be much better if the view remained facing forwards at the end of the transition. Avoiding the weird double snap back at the end would feel much better, especially where the mouse has moved during the transition and you get this feeling of random camera movement. A case of setting the PC/pawn rotation at the end of state ViewTransition, I'm sure.

Comments (2)

  1. Matt Hands reporter

    Fixed in commit 55d24d1.

    Added bLockCameraDuringTransition variable to both main vehicle classes (same as already in cannon pawn). Left false by default, but can be set as desired on a per vehicle basis. None of the vehicles has any special camera handling in transition animations, unlike a few turret buttoning/unbuttoning anims that use camera swivel to simulate looking up to reach for and use the hatch.

    If the option is used, it is now substantially improved because at the end of the view transition, the driver's view now remains facing forward (or wherever the camera bone was at the end of transition). So it removes the nasty view snap at the end, especially as the game used to capture 'invisible' mouse movements during the camera-locked transition. Will add same handling for locked view transitions in cannons.

    SpecialCalcFirstPersonView() is generally optimised. Added PlayerCameraBone, to avoid literal references to 'Camera_driver' bone (can be easily subclassed if any model has a different bone name). Zeroed FPCamPos to remove unwanted inherited default from RO, as SpecialCalcFirstPersonView() will now handle any FPCamPos, where previously it had been ignored.

  2. Log in to comment