Repository navigation
Conversation
Thrill12
commented
May 25, 2026
- added simple box collision detection
- added tests
- added transform, view, projection to color shader
Rinceri
left a comment
There was a problem hiding this comment.
Hey great work!!!! Very cool! Couple of comments but all logic etc. looks great.
If we're going to have a special docs page for it, do you want to do it as part of this PR or another one? Wouldn't mind if another one if you want to get this through ASAP
| { | ||
| if (_bodies[i].ApplyGravity) | ||
| { | ||
| ApplyGravity(_bodies[i]); |
There was a problem hiding this comment.
Could this be done in the same loop above? i.e. after j loop.
| { | ||
| for (int j = i + 1; j < _bodies.Count; j++) | ||
| { | ||
| CheckCollisions(_bodies[i], _bodies[j]); |
There was a problem hiding this comment.
Worth redesigning this in the future. I'm not sure how computationally expensive this is, but it is
| public Vector2 Forward | ||
| { | ||
| get | ||
| { | ||
| var radians = MathHelper.DegreesToRadians(rotation); | ||
| return new Vector2((float)Math.Cos(radians), (float)Math.Sin(radians)); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Could you add docs for this property? Thanks
There was a problem hiding this comment.
This is a bit pedantic and personal preference but what do you think of having standard for test names? See here: https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-best-practices#follow-test-naming-standards
Personally it makes test easier/quicker to read: from the test name itself, I know what method is being tested, how its being tested, and what is expected from it
There was a problem hiding this comment.
e.g. instead of Collision_Stay we do OnCollisionStay_Colliding5Frames_FireAction5Times
|
Fixes #46 Edit well that doesnt work |
|
I might remove #46 as part of the A/C is ability to zoom in/out. Will just update that issue |