Skip to content
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

WIP Update Bevy to main #19

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

WIP Update Bevy to main #19

wants to merge 5 commits into from

Conversation

Vrixyz
Copy link

@Vrixyz Vrixyz commented Sep 23, 2024

Currently testing on bevy commit 9386bd0

⚠️ big_space hasn't been updated.

Notable changes from bevy:

Comment on lines +93 to +94
let target_dist = (editor_cam.orthographic.scale_to_near_clip
* (orthographic.area.width() * orthographic.area.height()))
Copy link
Author

@Vrixyz Vrixyz Sep 24, 2024

Choose a reason for hiding this comment

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

This is definitely wrong, but I'm not sure what to put there.

Copy link
Owner

Choose a reason for hiding this comment

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

I think scale has been replaced with setting it here: https://dev-docs.bevyengine.org/bevy/render/camera/enum.ScalingMode.html

Copy link
Owner

Choose a reason for hiding this comment

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

It defaults to ScalingMode::WindowSize(1.0), and now if you were using scale of 2.0, you would now do ScalingMode::WindowSize(2.0). You will need to match on the scaling enum and extract the multiplier. I'm not sure if we can support anything other than windowsize, or if there is a better way to do this.


ortho.scale = (*triangle_base * multiplier) as f32;
let normalized_projection = ortho.scaling_mode / multiplier as f32;
ortho.scaling_mode = normalized_projection * *triangle_base as f32;
Copy link
Author

@Vrixyz Vrixyz Sep 24, 2024

Choose a reason for hiding this comment

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

modifications in this file are also difficult to assess for me. They are definitely wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants