[Resolved] Reset virtual camera on respawn or reload

Hi,

I need some help with camera reset on player respawn or load game form save. I’m using camera with body set to Framing Transposer and aim set to POV.

When player respawn or load inside same scene I use:

_currentVC.OnTargetObjectWarped( _currentVC.Follow, positionDelta );

and to reset POV:

CinemachinePOV pov = _currentVC.GetCinemachineComponent<CinemachinePOV>();
if( pov )
{
    pov.m_HorizontalAxis.Value = player.transform.eulerAngles.y;
    pov.m_VerticalAxis.Value = 0.0f;
}

My problem is that if I use damping then camera warp will also carry that with to new location and I don’t want that on respawn or reload camera do damping. Is there any way to reset damping or camera so my camera is on initial state?

Did you try setting vcam.PreviousStateIsValid = false when the player is respawned? That will cancel all damping (so you won’t need OnTargetObjectWarped).

2 Likes

Thank you! That worked perfect.

1 Like