mirror of
https://github.com/processing/processing4.git
synced 2026-01-28 02:41:08 +01:00
tiny reflection2 fix
This commit is contained in:
@@ -26,13 +26,11 @@ class Orb {
|
||||
void checkWallCollision() {
|
||||
if (position.x > width-r) {
|
||||
position.x = width-r;
|
||||
velocity.x *= -1;
|
||||
velocity.x *= damping;
|
||||
velocity.x *= -damping;
|
||||
}
|
||||
else if (position.x < r) {
|
||||
position.x = r;
|
||||
velocity.x *= -1;
|
||||
velocity.x *= damping;
|
||||
velocity.x *= -damping;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user