I currently have an a class in my game that uses negation and solid in game modelling that allows the player to create custom unions. However, after the player prompts the in game solid modelling to take place there is a noticeable time difference or lag between the negation of the part and the user’s request. Is their anyway how to improve this.
secondly, this function is kind of glitchy because after the several parts are negated the system becomes more and more slower, and also the solid model just stops loading after too many have been negated.
Don’t think you can. I’m assume that you’re solely using SubtractAsync, so the inefficiency would be coming from the backend workload rather than your code. I’m not too sure what your use case for allowing custom unions is but I can see why that’s becoming slow.
Unions are assets, just keep that in mind. That means resolving parts into a new assembly at run time (unions are comprised of triangles, if I recall correctly).
Slowed operations doesn’t mean the function is glitchy. This is a result of your server resolving so many unions at run time and probably multiple times on a single part.
Ever check your output? Loading is a result of a union being an asset. Unions have a triangle limit and a set of rules to follow; you may be experiencing unions that can’t be solved.