I’ve made a function in my game that allows you to swap between two characters on a button press. However, this also resets the camera position, as both pawns have their own camera. An additional problem comes up where the camera is stuck on a tilted angle if I switch while on a slope. I want to be able to swap between these characters without the player seeing any change in the camera’s position.
@Coolguy_Matt depends on if the camera is attached to springarm, attached to the character with an idle animation playing. The solutions I considered:
- Use the same Camera.
- Use a custom Springarm.
- Store last animation frame of current character, swap to new character - set to previous animation frame,
The best possible solution is not to use an actual camera.
if you use a child actor of type camera inside the blueprints you can them interp or blend between the 2 cameras giving you a nice effect instead of a jitter or jumping transition.
easy to do in BP and doesnt cost too much overhead.
SetViewWithBlend will work but if you need more control, use a camera manager class