Hi,
i want to make something like on the image. I want that the ball flies in a curve to the player 1. (after the ball collides with the player2)
Does anyone have an idea how to do this?
Thanks for help
Hi,
i want to make something like on the image. I want that the ball flies in a curve to the player 1. (after the ball collides with the player2)
Does anyone have an idea how to do this?
Thanks for help
Is the ball always supposed to hit the other players head, or do you just want to have the ball travel in a parabola? If the latter, add a RigidBody2D to your ball and then give the it a diagonal force, for example:
GetComponent<RigidBody2D>.AddForce(new Vector2( xForce, yForce ));
The higher the value of the yForce, the higher the ball will go. Whereas a high xForce value will make the ball travel faster and longer.
Hi, thanks for reply. Yes, the ball is supposed to hit the other players head.
I am working on a solution with iTween. But its not smooth enough. Between the iTween “speed” and the gravity is a difference. I did a curve with iTween (ball follows the curve path) and the falldown is with the gravity.
Regards