Search Unity

Animation Troubles 2D animation sprites and colliders - Parent and Child issues

Discussion in 'Animation' started by jimm84, Jul 12, 2019.

  1. jimm84

    jimm84

    Joined:
    Feb 26, 2017
    Posts:
    7
    Hello all,

    I was hoping somebody could help, I'm trying to animate a 2D blast wave with child object. The animation tools in Unity are something I'm going to say that I am clearly not used to - although I have used After Effects and Adobe Animate.

    So, in my scene I have a 2D circle collider that pushes the player etc away in it's animation it expands and contracts like a blast - boom! As it stands this works ok on its own for the time being.

    This is where the trouble starts. now I have created a 2nd object, added the child to the animated collider, and it wont allow me to animate the sprite without scalling the collider to monstrous proportions, basically when i scale the child, I dont want to scale the parent also.

    When I manually type the numbers in keyframe 1 = Collider size = 1 1 1, Sprite = 1 1 1. 2nd frame all elements = 4 4 4 (Size) despite this being typed when record is pressed, my Collider, (the parent) appears to be doing its own scaling and playing by it's own rules an offer results I'm not expect. its only 2 keyframes.

    Could anyone offer any tips as to where I'm going wrong or what I could do better to achieve an animated shockwave and collider? I would sooner keep it visual if possible.

    Thanks for you help,

    J
     
  2. jimm84

    jimm84

    Joined:
    Feb 26, 2017
    Posts:
    7
    Could have been me being daft but I have come at this from a different angle today.

    My original approach made it needlessly difficult and bloated. Easiest solution after sleeping on it. I deleted the object, created a new 'Blastsprite', dragged into my scene just added the collider component. (not a parent and child) I then animated these and they expand and contract in the animation as expected.

    Works as I expect for now.