Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Animation locked camera rotation (Now with video) [SOLVED]

Discussion in 'Animation' started by Mokzen, Apr 11, 2018.

  1. Mokzen

    Mokzen

    Joined:
    Oct 10, 2016
    Posts:
    102
    Hello again, fellas.

    I realised I may have done a ppor job at explaining my issue, so I recorded a small piece of video that might help explain it better.

    The issue I have is, my camera works great, right until i fire a method which makes my player take damage. The method also plays an animation on the camera (a small bob back to indicate taking a hit).

    The problem is, after the "getting hit" animation, the camera's rotation is now constrained to the y-axis.

    Here's the video:


    Any help is much appreciated <3
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Before the camera gets hit - how is it controlled? It is not in the idle state.
    After the camera gets hit - it is transitioning into the idle state. The idle state is not allowing the camera to move as you want.
    Shouldn't the camera transition to exit after getting hit?
     
  3. Mokzen

    Mokzen

    Joined:
    Oct 10, 2016
    Posts:
    102
    The reason it doesn't start in the Idle state is because at the beginning og the game I disable the Animator, or else, the camera rotation would be constrained to the y-axis.

    The idle plays an animation, which doesn't have restrictions to the camera, and still it is locked.
     
  4. Mokzen

    Mokzen

    Joined:
    Oct 10, 2016
    Posts:
    102
    No one has any idea about this issue? :)
     
  5. Mokzen

    Mokzen

    Joined:
    Oct 10, 2016
    Posts:
    102
    This issue has been resolved.

    I added the FirstPersonCharacter object to an empty gameobject, which i then animated instead.
     
    theANMATOR2b likes this.