Ability to separate UnionOperation classes into their component parts

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.

8 Likes

There is, actually. But it’s plugin only. So I do agree we need a SeparateAsync() too.

I believe this limitation was implemented because only Studio can access post-union data.

1 Like

I believe unions themselves dont store information of parts and unions are stored in roblox’s asset delivery, but im not sure why we’re restricted from doing that in runtime. It does obtain data from somewhere when separating in studio, eh?

I don’t know what, if any, technical limitations as to why this cannot be done. I do know that unions seem to store all the parts that make them up though. We all know that Studio can do it. I find it strange that we can create unions by script but can’t undo them.

We need this. It’s stupid how they added the :IntersectAsync() method, but is still leaving out the :SeparateAsync() method. If it’s impossible to add for whatever reason, there should be transparency for that.

2 Likes