Issue
It is currently too hard to manipulate UnionOperation
classes via code. As unions are functions of the BasePart
class, we have BasePart:UnionAsync()
, BasePart:SubtractAsync()
, and even the new BasePart:IntersectAsync()
. However, a method to separate unions via script does not exist.
Use Case #1
The first use case for adding a separate method is to deconstruct unions in lieu of creating an explosion for shrapnel. By deconstructing the union into its component parts and then using the Explosion
class, a shrapnel effect is obtained. Of course, this is dependent on the size and number of parts that make up the union.
Use Case #2
The second use case for adding a union separate method is to change or reconfigure the union in real-time. Some games use unions for map elements and being able to change the unions facilitates the use of randomly generated maps if large parts of the map are made of unions.
Use Case #3
A third use case was mentioned in this thread where someone wanted to generate a minimap using tiles, but it couldn’t be done because of unions. I don’t know if the original poster solved their problem or not.
Conclusion
If this feature is implemented, it will not only complete the UnionOperation
API, but it will also facilitate the above mentioned use cases and allow another avenue of creativity when developing experiences on the platform. As it stands right now, the API is not complete since we can negate parts, combine them into unions and intersections, but we can’t separate them.