- Home /
Question is off-topic or not relevant
How do box collider collisions work mathematically?
Hi
I want to know how the Box Collider works in Unity. I have read all of the Unity documentation and PhysX documentation but there are not any detailed explanations as to exactly how they work (possibly because it's confidential IP).
How does a box collider know when it is intersecting/overlapping another box collider?
What metric is actually measured to know when a collision has taken place? Does it look to see if there is a point or vertex in the box collider is inside the volume of another collider? If so how does it know that a vertex is within the volume of another collider?
What are box colliders made from? Is it lots of small objects put together or is it one big object?
Thanks for your help in advance
I have to agree with tormentoarmagedoom, this is actually off topic. Unity uses PhysX to perform any physics calculation. Just because Unity uses some framework or underlying system doesn't make a valid question here. Otherwise you could argue the same way to ask how a mouse works mecanically / optically. It's kinda irrelevant as long as you know how to use it.
PhysX is propritary software so yes, you could say the implementation it's confidential. Though Nvidia actually made the software implementation freely available. You just have to register as a developer. Though their hardware implementation that runs on the GPU is a secret. Physics calculations like that can get really complicated. You should have a solid ground in geomety, algebra and calculus if you want to "understand" what is happening.
Note: $$anonymous$$ake sure you read the agreement when you register. You are not allowed to share any portion of the source code or create derivative work based on the source code. The PhysX source may not be a good source if you want to implement your own detection based on that work as this is not allowed unless you find an independent publicy available source for that portion. You're better off with an actual open source implementation like for example the Open Dynamics Engine. Though it also has some restrictions as it's released under LGPL, so any modifications or derivative work has to be released under LGPL as well. Here's the heart of that engine
Answer by tormentoarmagedoom · Aug 29, 2018 at 10:25 AM
Good day.
I think this is not the place for this kind of question.
Here we help peopple to develop its projects, help with functions, with code, etc.. You are asking how is Unity from inside, and maybe nobody here knows the answer...
And why you wwant to know this? what propouse?
Bye
You may not know how to answer this question but I am sure there are many other people on these forums who do have the knowledge. I have asked complex questions like this before and got very good answers from people.
Since this is the only official unity forum then this is the place to post this question. I want to know how it works so that I can get an understanding of how physics engines work on the granular level and their computational efficiency so that I can make higher performance games and not waste unnecessary resources.
Please explain why you have closed it off and how it is off topic and not relevant?
I would appreciate if you can undo this action.
Unity uses Nvidia PhysX for physics calculation. This is the most elaborate answer that is still relevant to this forum