As you can see in the title, I have a few questions
- What is more optimised / efficient?
- Difference between the two? (use cases if needed)
As you can see in the title, I have a few questions
GetPartsInPart() takes into account the precise volume an object occupies, so its geometry is fully evaluated, while GetPartBoundsInBox() considers its bounding box. Bounding box is a fairly simple shape (rectangular solid), which makes it more efficient at the cost of precision.
In the picture the white border represents the bounding box of a union.
Akin is the difference between GetPartsInPart() and GetPartBoundsInRadius() when checking with spheres. In case of GetPartsInPart(), only objects overlapping the sphere may be found in a query. In a hollow sphere, any parts outside or inside will not be included, whereas in a radius check the result will include all parts overlapping the full ball/globe.
The green part in the second picture is inside a sphere, a hollow union. The white box around is its bounding box. GetPartsInPart() doesn’t detect it and GetPartBoundsInRadius() does, with higher efficiency and apparent simplification of the shape. Just like in the first example, GetPartBoundsInBox() queries in bounds of the bounding box.
Which one to use? Depends on your precision needs.
Update. @JuniorMikezz expanded reply.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.