Collision algorithm for area check #3782
Replies: 5 comments
-
(1) What is the exact shape of the area? If it is an axis aligned bounding box, you can use the broadphase checks. Otherwise, it depends on the shape. (2) What information do you want? Just an array of objects that overlap, or more (depth, normal, contact positions etc)? |
Beta Was this translation helpful? Give feedback.
-
I need to support all the convex shapes, and I would just need an array of bodies that overlaps. I was thinking about SAT algorithm. |
Beta Was this translation helpful? Give feedback.
-
Yes, Bullet has the SAT implementation, but it needs to be organized to get what you need. For the convex shapes, you need to call initializePolyhedralFeatures, so SAT can be used. The code is here: You probably only need It would probably be better to implement a dedicated area check using this: In that case, don't m_enableSAT (since GJK/EPA is likely better quality/faster for regular physics) but just use your newly written area check using SAT. |
Beta Was this translation helpful? Give feedback.
-
Perfect, thanks for these info, I'll integrate it and let you know. |
Beta Was this translation helpful? Give feedback.
-
The function I'm interested to know why such chose. It's much optimal the curren algorithm compared to the (eventual one) that uses primitive shapes? I'm asking because this function forces me to also maintain a list of polyhedron, which is not so nice. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
@erwincoumans in godot engine we are using the gjk/epa algorithm to detect area overlaps.
That algorithm is really slow/non-optimal for such use. What is the optimal algorithm that bullet provides, or one that you can advice to use, for areas overlap detection? Is the SAT already available in bullet?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions