Closed kinnerapriyap closed 7 years ago
@kinnerapriyap thanks again for this PR. When I tested it, the angle of return off the bumper seemed off. Can you look into this again and reopen a new PR? I think it has to do with the math that you added:
ball.velocity.x *= -(PREFS.bumperBounce/5);
@sleddog The angle if off because the velocity parallel to the bumper has no force on it and remains the same. The velocity perpendicular is reduced because of loss in kinetic energy due to collision. So since only one component of velocity changes, the angle changes. Do let me know if you want me to make any changes to it.
Change bumper collisions to account for rubber. Add bumperBounce as preference.