-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Node::transform
field
#17919
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
Node::transform
field
#17919
Conversation
In layout updates apply the layout position translation to the transform field and then `set_if_neq` it to the node entitie's `Transform` component.
Isn't this a bit anti-composition? The |
Yep, this isn't good at all, it's just the minimum I thought might possibly get merged as an intermediate step towards some of the problems with the UI transforms. #8240 is my preferred approach but it's going to take forever to update for main and it's been really difficult to reach concensus on changes like this.
We could make |
This seems like a good use case for a new transform type that better matches the semantics of how it is being used. I don't want to suggest that should be done here, but it does seem more and more compelling. Even if we make UI rendering more like the rest of our 3d rendering stack, as long as the layout system produces a I hope you don't take my initial comment as a vote against this change. I happened to stumble upon it and wanted to understand what the motivation was, the first post doesn't really explain why we want this. |
Yeah I had some older PRs that added UI transform types, but it was hard to get any sort of concensus, so I was going for the lowest impact change that would fix the bugs here. I don't think it's a great approach though, closing. |
Objective
Add UI node transform support with minimal changes.
Solution
transform
field toNode
.set_if_neq
it to the node entity'sTransform
component.Then leave
propagate_transforms
to update theGlobalTransform
s.Testing
Reviewers can look at the
overflow_debug
example, which is the only current UI example that modifies the transform.