Let’s say i have 1 hitbox A that moves towards 2 other hitboxes (B and C) and intersects with them.
Now they start to intersect. How do i calculate how much Hitbox B and C overlap with hitbox A?
p.S.: All these boxes are 3D
By “how much they overlap” I assume you mean the volume of the closed polygon created by their intersection.
There might be some boolean geometry library you can use if you can find one; otherwise, that’s a very tall order. In 2D, it’s easier. In 3D with spheres or AABBs, it might be easy enough to approach without a degree in mathematics, but it’s still non-trivial.
Just as a side note, someone correct me if I’m way off, but as far as PhysX is concerned, only two objects intersect at a time. There’s no such thing as a relationship between three or more objects. So you’d have to solve the problem one pair at a time, then compare the results from the AB and AC intersections.
Did you perhaps mean something simpler than this? How do you plan to use this information, and in what form are you expecting it? I’m sure there are some clever hack-y ways to approach this problem, trading accuracy for simplicity and ease.