Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BasePart:SubtractAsync (and potentially BasePart:UnionAsync) can return nil despite developer documentation #570

Closed
Agapurnis opened this issue Apr 16, 2022 · 3 comments

Comments

@Agapurnis
Copy link

Relevant method documentation states that it will return an Instance (actually, an empty abstract extension of PartOperation, but that's irrelevant here)

However, an official announcement and personal experience state that it can return nil in certain events.

The operations throw an exception if there was a problem in computing the result (too many triangles, unsupported part types, the usual). If the result is an empty mesh, they return nil. If everything went well, they return a PartOperation representing the computed result, which can be used in subsequent operations if necessary.

~ linearcomplex, New Roblox In-Game CSG API is now availabl, August 31, 2018

Emphasis (bold) mine.

This can be edited here, as overrides are already present.

@Dionysusnu
Copy link
Contributor

This might be a case of #543, or might just be an oversight.

@Agapurnis
Copy link
Author

Agapurnis commented Apr 16, 2022

This might be a case of #543, or might just be an oversight.

I would be fine if it were solved similar to #543, as if it were forgotten/omitted in the documentation and an issue hasn't been raised here before, it obviously isn't a huge issue. This only really happened because I was negating things improperly, and this took me down the wrong direction.

@osyrisrblx
Copy link
Member

Was able to reproduce this with SubtractAsync, but not UnionAsync. I thought if I negated one of the parts first and then unioned them together it would, but union async seems to treat negative parts as normal parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants