-
Notifications
You must be signed in to change notification settings - Fork 137
Conversation
Scripts/Tools/SurfaceEditor.cs
Outdated
Polygon polygon = selectedSourcePolygons[polygonIndex]; | ||
Brush brush = csgModel.FindBrushFromPolygon(polygon); | ||
|
||
// todo: I don't understand... are the normals simply inverted due to some math bug elsewhere? Inverting my logic depending on the CSG Mode fixes it... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the correct logic, as you're comparing source polygons rather than built polygons you're working with the brush polygons which always point outwards regardless of if they're subtractive or not. It's the build process itself which is responsible for making the subtracted faces have the correct normal. This code looks fine as-is but it would be good to remove the TODO before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly thanks for your hard work, all three changes are great additions and will help a lot of people! I'm happy to merge this PR as-is, but if you want to remove the TODO comment prior to merge let me know. In particular the Finding Hidden Faces idea is really inspired.
For future PRs it would be better to branch from master for each feature and create the PR for each feature branch so that features can be reviewed/merged in isolation
Thanks!
Barnaby
Previously you had to select each face you wanted to use individually until your finger cramped:
Now you just hold shift, press the left mouse button and move over the faces you want to select: