0

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

  • it's not confidential IP, it's just geometry math. – bolov Aug 29 '18 at 10:04
  • Each box collider is an array of 8 vertices, each with x,y,z positions. Thanks to math, if you know position of each of 8 vertices and position of a point you want to check then you can calculate if this point is inside a box made out of 8 vertices. – FCin Aug 29 '18 at 10:09
  • Asking how is determined if two boxes intersect is a boring question. Add the time component and ask how detecting collisions works in a discrete systems that simulates a continuous real system that gets more interesting, but off-topic here. – bolov Aug 29 '18 at 10:09
  • @FCin but you don't want to know if a point is inside a box. You want to know if two boxes intersect. Different problem. Same answer: geometry math. – bolov Aug 29 '18 at 10:10
  • https://gamedev.stackexchange.com/a/26506/101664 – Kashif Siddiqui Aug 29 '18 at 10:54
  • https://www.toptal.com/game/video-game-physics-part-ii-collision-detection-for-solid-objects – Kashif Siddiqui Aug 29 '18 at 10:54

0 Answers0