Search Unity

2D VolleyBall

Discussion in '2D' started by TheIrishKraken, Jul 3, 2015.

  1. TheIrishKraken

    TheIrishKraken

    Joined:
    Nov 26, 2013
    Posts:
    4
    I am wondering what is the best way to get my 2D sprite to collide with a ball and hit the ball up in the air at an angle?
    I have an animation of a bear swinging his arms up when I press a button. Like you would see someone hitting a ball in volleyball.
    I taught of placing an edge collider where his paws would be and enabling this collider only when the animation plays so it looks like he is hitting the ball with his paws.
    This ball uses physics by the way.
    I would like to know if there is an easier way I could achieve this maybe!
     
  2. 1Piotrek1

    1Piotrek1

    Joined:
    Mar 14, 2014
    Posts:
    130
    Enabling gameobject is the worst way to do this.
    If you use in editor animation you can attach edge collider to every part of your character's hands.