Timeline for Bouncing Balls in angular movement
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 23, 2017 at 12:37 | history | edited | CommunityBot | replaced http://stackoverflow.com/ with https://stackoverflow.com/ | |
| May 26, 2016 at 15:47 | comment | added | Dan | It's also worth noting that dividing by 2 indefinitely will never reach exactly zero, so it's probably a good idea to implement an epsilon check for resting objects. e.g. in the update function where you are setting position based on velocity, do something like if (vel.x < epsilon) vel.x = 0.0f; and likewise for y; where epsilon is some negligible velocity e.g. float epsilon = 0.001f. | |
| May 26, 2016 at 15:43 | history | edited | Shaun Wild | CC BY-SA 3.0 | added 246 characters in body |
| May 26, 2016 at 15:42 | comment | added | Shaun Wild | Oh, yes. Very true thanks for spotting that. I'll edit my answer. | |
| May 26, 2016 at 15:37 | comment | added | Dan | I don't think reversing both velocities for every collision is correct. You'd more likely want to reverse only the component which is perpendicular to the collision surface. | |
| May 26, 2016 at 14:43 | history | answered | Shaun Wild | CC BY-SA 3.0 |