Skip to content

Fix rotated child panels translating in the wrong transform space#23

Closed
Remscar wants to merge 1 commit intoFacepunch:masterfrom
Remscar:nawar/panel-transform
Closed

Fix rotated child panels translating in the wrong transform space#23
Remscar wants to merge 1 commit intoFacepunch:masterfrom
Remscar:nawar/panel-transform

Conversation

@Remscar
Copy link
Copy Markdown
Contributor

@Remscar Remscar commented Nov 26, 2025

Fixes bug #645

  • In PanelRenderer.Matrix.cs, the transform origin is now converted using the parent's inverted global matrix before applying translation, ensuring correct positioning in transformed hierarchies.
  • The translation and restoration of the origin now use the transformed origin instead of the raw origin, which aligns panel transformations with the parent's transformed space.

Before:
https://github.com/user-attachments/assets/ef3a9694-4b35-455c-8843-4bc7afbad8b3

After:
https://github.com/user-attachments/assets/e0d356f9-c676-4b54-a89e-329f01c67a63

@garrynewman garrynewman added the triaged triaged pull-requests are replicated on the internal sbox repo label Nov 27, 2025
Copy link
Copy Markdown
Member

@handsomematt handsomematt left a comment

Choose a reason for hiding this comment

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

Amazing thank you

@handsomematt handsomematt added the accepted this pull request was accepted, hurrah! label Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted this pull request was accepted, hurrah! triaged triaged pull-requests are replicated on the internal sbox repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants