-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Collision Detection #393
Comments
Hi @duarm, Sorry for the delay, I was saw the issue but couldnt reply,
Good point, what are your suggestions?
For instace
Yes definitely, we can improve ray api |
Well, the first thing it comes to mind is alphabetical, it becomes consistent and problem solved. The nitpick point is that we might lose a tiny bit of expressiveness, since we might want to check "If a CIRCLE is overlaping an AABB", e.g. a player is inside an area, if we only have The alternative is a macro and provide both I think alphabetical is best, and we can always add a macro later.
Depends on what you want. If you want to simply de-overlap A and B, you only need a |
Seems ok to me but for instance
I'm not sure, maybe we should keep things simple by not involving physics collision stuff for now. For me, working on physics as separate library is in TODOs. Maybe keeping detection only stuff for now is right thing to do.
Nice reference, thanks, will check it deeply asap. Feedbacks are welcome. |
It's fine, lets say _aabb_v_circle(), the actual procedure should be placed in the file following alphabetical order, so in this case inside aabb.h, and circle.h gets a macro, if the api surface is not a problem.
I agree, another library which depends on cglm. |
No prob :)
Nice 👍 |
There are currently some collision detection functions split between box.h, aabb2d.h, ray.h, sphere.h. This issue is about discussing how to improve the API.
I'm using _TYPE_vs_TYPE naming here because I find it less confusing then, e.g. _circle_circle
Where to place a function?
Let's say we have a _circle_vs_aabb2d, should this function live inside aabb2d.h or circle.h? should it be called _aabb2d_vs_circle or _circle_vs_aabb2d? or perhaps both with macros?
Collision Resolve functions
Most functions are for detection only, either there was a collision or not, should we have functions which provide the information necessary to resolve the collision? Something like the point of collision, and the distance?
Ray
Ray is currently pretty barebones, some more ray_vs_ other colliders would be helpful.
The text was updated successfully, but these errors were encountered: