Search Unity

Question Position changes when playing animation.

Discussion in 'Editor & General Support' started by Jiry_XD, Nov 8, 2020.

  1. Jiry_XD

    Jiry_XD

    Joined:
    Aug 3, 2020
    Posts:
    20
    Hey Everyone,

    I have an animation that rotates the car when for example swiping left, then the car will rotate to the left. The problem with this is that it also changes the x position of my car

    I have turned "apply root motion" off and it is still the same, i also only have rotation keyframes and no position keyframes in the animation

    Any idea how to fix this?

    Also for some context: I have a car moving at a constant moveSpeed in the Z axis, maybe the car makes friction with the collider on the road?

    Could that be why?
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Are you animating the car's transform, or one of its parent objects?

    Where is the pivot point of the car mesh? Is it at the geometric center, or somewhere else?
     
  3. Jiry_XD

    Jiry_XD

    Joined:
    Aug 3, 2020
    Posts:
    20
    I'am animating the car's transform, the pivot point of the car is in the center, below the car