Search Unity

Camera rotation after animation

Discussion in 'Animation' started by SeanGause, Sep 4, 2017.

  1. SeanGause

    SeanGause

    Joined:
    Dec 24, 2015
    Posts:
    127
    So I have an animation that "teleports" the player to a different location. After the animation finishes, the player's head snaps to the right (because the player is facing this direction when the animation is triggered). How can I make the last frame of my animation into my new rotation values so the transition from animation to player control is seamless?



    The above video is of the problem.
    I walk through the door once and it works fine, walk down the hallway, and then hit the trigger at the end of the hallway (down the stairs). Then, at the end of the video, you can see that my camera rotates 90 degrees to the right. I hope this helps.
     
  2. froilan_dE_dios

    froilan_dE_dios

    Joined:
    Jul 28, 2015
    Posts:
    15
    save the transform.rotation of your camera immediately before returning the control of the game to your player and set it as the new rotation.
     
unityunity