forked from armandas/Plong
-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
This will have something to do with the position from which the ball collides with the bar:
3 rebound angles:
- 30º (dx = 2; dy = 1);
- 45º (dx = dy = 1);
- 60º (dx = 1; dy = 2);
in each of the 4 directions.
About the rebound results (not final rebound sizes):
- if ball collides with the bar on its edge (around 10% of its size) it will rebound with 60º
- if ball collides with the bar on its edge (between 10% and 25% of its size) it will rebound with 45º.
- If ball collides with the bar on its center (around the remainder 25% of the bar size), it'll rebound with 30º.
Rebound will be to the left if the collision is on the left side and to the right if the collisions are on the right side of the bar.
Reactions are currently unavailable