-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
objects react to collisions (stop movement, explode, remove entity, ...) #38
Comments
turns out AABB is not sufficient when 2d objects can rotate ... see https://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect and for more details: |
Example on how to do the math with points and rotate matrix... https://math.stackexchange.com/questions/126967/rotating-a-rectangle-via-a-rotation-matrix |
@jevbelikov see https://github.com/brotherhood-of-recursive-descent/tankism/blob/master/lib/collision/collision_test.go for the first test on collision AABB style |
Maybe helps: cos(-\theta) = cos\theta |
currently objects move through each other. There should be a basic collision detection system, that reacts when there was a collision detected
AABB: https://github.com/co0p/foodzy/blob/c9a8a145f264da217b0a9af2f48d588e712c8418/collisionSystem.go#L71
The text was updated successfully, but these errors were encountered: