Timeline for Collision Direction Detection
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 1, 2015 at 22:14 | vote | accept | Mathias Siig Nørregaard | ||
Dec 31, 2014 at 12:09 | comment | added | Mathias Siig Nørregaard | It's not really a typo, the vector actually has 4 elements, but you can choose to use the two of them. I can't explain it, as I don't fully understand it. However, I see that I can just use distances.at(1).x instead. Thanks. | |
Dec 29, 2014 at 19:46 | comment | added | ChrisC |
Is distances.at(2).x a typo? There only seem to be two Vector2f objects stored in the std::vector so I assume you are trying to access index 1 and not 2 for the vertical movement (as with your code for pushing down).
|
|
Dec 29, 2014 at 18:32 | history | edited | Mathias Siig Nørregaard | CC BY-SA 3.0 |
added 1586 characters in body
|
Dec 29, 2014 at 17:07 | answer | added | Stephane Hockenhull | timeline score: 0 | |
Dec 29, 2014 at 17:05 | answer | added | user55564 | timeline score: 0 | |
Dec 29, 2014 at 15:29 | comment | added | Iggy | Remember that there are actually two things going on: collision detection and collision resolution. To resolve the collision you have to do extra work and figure out how far the objects intersected. This could be a simple vector which can be multiplied by the position of the collided object, resulting in directional movement. | |
Dec 29, 2014 at 13:10 | review | First posts | |||
Dec 29, 2014 at 13:21 | |||||
Dec 29, 2014 at 13:09 | history | asked | Mathias Siig Nørregaard | CC BY-SA 3.0 |