Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Camera cannot follow player correctly after respawning

Discussion in 'Cinemachine' started by huyphamphu91, Jan 8, 2020.

  1. huyphamphu91

    huyphamphu91

    Joined:
    May 5, 2019
    Posts:
    1
    Hello guys,
    I am making a 2D platformer game and got an issue when player falls off the platform. At time the player falls off the platform, he died. And i just setactive him to false then set him back to a respawn point and set active him to true. The problem is when i do that the camera still follows player but not correctly. It's kind of cannot align the player at the middle of the dead zone at first. Can anyone help me with this? Thanks.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,747
    Have you tried setting
    vcam.PreviousStateIsValid = false
    when you reposition?