Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

fix(gizmos): scale child positions on viewport resize + add messages#267

Open
Extermind wants to merge 3 commits intobevyengine:mainfrom
Extermind:fix/253-tranform-gizmo
Open

fix(gizmos): scale child positions on viewport resize + add messages#267
Extermind wants to merge 3 commits intobevyengine:mainfrom
Extermind:fix/253-tranform-gizmo

Conversation

@Extermind
Copy link
Copy Markdown

fix(gizmos): scale child positions on viewport resize + add messages
crate

When scaling TransformGizmo for viewport size changes, arrow tips and
plane
handles were not moving proportionally because local translations
remained
fixed while only GlobalTransform was overridden.

Solution manually scales each child's translation vector by
viewport_scale
when computing final GlobalTransform via gizmo_pos.mul_transform().

Added bevy_transform_gizmos crate with ViewportSize type and
ViewportResized
message for standardized event-driven viewport management across editor
systems.

Fixes #253

crate

When scaling TransformGizmo for viewport size changes, arrow tips and
plane
handles were not moving proportionally because local translations
remained
fixed while only GlobalTransform was overridden.

Solution manually scales each child's translation vector by
viewport_scale
when computing final GlobalTransform via gizmo_pos.mul_transform().

Added `bevy_transform_gizmos` crate with `ViewportSize` type and
`ViewportResized`
message for standardized event-driven viewport management across editor
systems.

Fixes bevyengine#253
@alice-i-cecile
Copy link
Copy Markdown
Member

Was this intended to be marked as a draft? :)

@Extermind
Copy link
Copy Markdown
Author

Yeah, it's because I'm still new to GitHub. I primarily use a different platform for work-related code. Marked as ready for review.

@Extermind Extermind marked this pull request as ready for review April 11, 2026 12:35
Copy link
Copy Markdown
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

We definitely shouldn't have a dedicated events crate. We split code by functionality in here :)

The fix itself looks reasonable though.

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.

Inconsistent transform gizmo size while scaling viewport

2 participants