Hi,
I’m making a 2D platformer game and now I want to trow a ball.
The ball has to collide with everything except my player. So I added a rigidbody 2D and a trigger collider, I also added a child with a normal collider (with different layers so I can filter what I want to collide with).
Now the physics are working just fine, the ball is bouncing of everything but it’s not yet starting with a velocity. Now it just starts and let gravity do his thing.
What I want is to give my object a start speed depending on how I possition my joystick (xbox controller).
Calculating the angle isn’t hard but for now a fixed angle will be fine. If I add force on awake, I see I can make it move but it seems that the force stays there. (like I make it go right, it collides with a wall, bounces left but the force makes it go right again). Is there any way to fix this?
Thanks allot guys!