Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

really basic camera animation problem

Discussion in 'Animation' started by johnmcmahonart, Aug 3, 2016.

  1. johnmcmahonart

    johnmcmahonart

    Joined:
    Jul 15, 2016
    Posts:
    19
    I know I must be doing something really obviously wrong but I can't for the life of me figure this out. Every time I try to rotate the camera in the negative direction the amount is always subtracted from 360 and so the camera rotates completely around to arrive at the desired rotation angle. I guess the rotation ends up being absolute instead of relative to the current amount.

    Ex

    keyframe at start with 0,0,0 for all angles
    keyframe at 60 samples say -10,0,0 the actual value in the curve ends up being 350,0,0

    I tried messing with the interpolation but none of the choices work correctly though quaternion seems close but it does a weird bouncy thing between the values (really bad description I know).

    Everything works fine in the positive direction. Tried deleting camera and starting from scratch with camera and animator from scratch no luck.
     
  2. Prashanthbv

    Prashanthbv

    Joined:
    May 7, 2015
    Posts:
    4
    Arghhh!!! Having the same issue
     
  3. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    This is normal behaviour for quaternions. The quaternion doesn't know about rotations outside of a full circle.

    There was a bug with the rotations being stuck in 0..360, it should have been fixed now. What version are you using?
     
  4. johnmcmahonart

    johnmcmahonart

    Joined:
    Jul 15, 2016
    Posts:
    19
    Running 5.3.5f1