Download

Weird Spring Arm Bug?

Ok so, i have a vehicle(car) and i want to switch between; freely using the mouse to the move camera, and to lock the camera to the rear so you can always see in front of you (like in third person template).
But that’s not the hard part, i have wired relativity problems when i switch between the two camera states, to lock the camera; i do this.



SpringArm->bUsePawnControlRotation = false;
SpringArm->SetRelativeRotation(0.f,0.f,0.f);


but when i want to switch back to the “free camera”; i do this.



SpringArm->bUsePawnControlRotation = true;


The problem is… once i move the mouse/camera it jumps back to its last (UsePawnControlRotation = true) position rather than adding the move input to its current camera position.

It’s hard to explain without supplying a video but i hope you understand, please ask me any further questions if necessary. Thanks

You could take that position, get also the player position and apply a delta transform to account for that offset.
It seems, without looking at the code, that “SpringArm->bUsePawnControlRotation = false” causes some updates to some variables somewhere to be omitted…