Search Unity

Predict VirtualCamera position on teleport

Discussion in 'Cinemachine' started by Flag74, Oct 25, 2018.

  1. Flag74

    Flag74

    Joined:
    May 31, 2017
    Posts:
    128
    Hi,
    After teleporting my character to a new poisition, I just need to teleport the character-following camera to the new position without any blending.
    If I position the camera exactly over the character and use OnTargetObjectWarped(), the camera would in any case blend to compensate FramingTransposer Zoom and ScreenX/Y.

    How can I now in advance where I should teleport the camera to to avoid those blendings at all?I should apply those calculations to the camera manually but I dont know how.
    Is there any Forced Update/Calculations method?

    thx
     
  2. Flag74

    Flag74

    Joined:
    May 31, 2017
    Posts:
    128
    It looks like setting PreviousStateIsValid = false after OnTargetObjectWarped(), cancels the blending completely.
    I'll go with that
     
    Gregoryl likes this.