So I’m attempting to create an easy way to rapidly create houses for a game I’m developing, and to do so need to be able to cut a hole in the walls of a pb_Object mesh via scripting to create windows and door frames.
Does anyone have an idea of how to do that? I’m aware of the methods used outside of scripting, but can’t figure out a way to translate any of them >_<
General-case you’re looking for Constructive Solid Geometry. ProBuilder has some kind of in-editor functionality for this but I don’t know if it is exposed at runtime, or what the API looks like. Generally it operates on two pieces of geometry and either Unions, Differences, or Intersects them.
@Zilby FYI; there are also CSG level design tools out there such as Realtime CSG (an asset on the asset store I created) or Sabre CSG. It may or may not fit your needs …
I’ll keep that in mind for the future, at the moment I’m no longer working on the team that was using probuilder though. I did eventually get some of the probuilder CSG code working, but it was super finicky and obtusely designed so I’m going to avoid doing that again if I can in the future.