- Home /
How can I fix animations that are too high or too low without moving the box collider?
This is 2D.
Problem: Relative to the bottom of the BoxCollider2D I have attached the player, some of the animations are too low or too high. Since my character controller revolves around this collider, some of the animations end up too high or too low relative to the ground of the world. All the parts in each animation are not multi-editable (basically they have to be moved individually).
Contraint: I don't want to move the box collider surrounding my player during any of the animations because my character controller uses it to cast rays so I don't want the collider going into the terrain just because an animation moved the collider lower. Another reason for not wanting to move the collider is because this just adds one more thing to animate which affects performance.
What I've tried: I hit the record button on one animation, then I parented all the parts I needed to move in the animation to an empty game object and then moved the game object to position an animation correctly. This fixed one animation, but this also moved the parts in EVERY animation. So basically if I fix one animation, it breaks the others.