Skip to content
This repository was archived by the owner on Feb 11, 2024. It is now read-only.

Fixes #26 Brush moves erroneously when set to non-one scale. #27

Merged
merged 1 commit into from
Jan 21, 2018

Conversation

Henry00IS
Copy link
Collaborator

I can't recommend scaling brushes like this but at least this stops random re-positioning for any users that do so regardless.

The transformation controls (and visual bounds) are scaling properly, be it the root "CSGModel" or compound brushes. However, their child brushes' built geometry does not scale relative to the parent. If we can add support for that we'd probably support scaling completely and can thus also fix issue #23.

@@ -817,7 +817,7 @@ public void ResetPivot()
}

// Bounds is aligned with the object
transform.Translate(delta);
transform.Translate(delta.Multiply(transform.localScale));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceivably this could be lossyScale, but that may have issues if the brush is rotated and the parent/root is scaled non-uniformly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the same thoughts and lossyScale worked just fine on my quick tests however like I mentioned the parent/root scaling is ignored by the CSG building process (the tools and wire-frames scale properly), it's not ignored for brushes where it works perfectly but it's ignored again for compound brushes (another parent scale I suppose). LossyScale did not resolve this problem in any way or form. It would be nice to fix all of the scaling. But unless you immediately know where to look to change the CSG output to scale according to the parents...?

@sabresaurus sabresaurus merged commit 9984d9a into sabresaurus:master Jan 21, 2018
@Henry00IS Henry00IS deleted the Issue26 branch January 22, 2018 15:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants