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

added filtering of 3d and 2d cameras to allow for 3d and 2d cameras to operate simultaneously #304

Merged
merged 4 commits into from
Feb 24, 2024

Conversation

skylerparr
Copy link
Contributor

When rendering with 2D and 3D cameras, the results would be very unpredictable. Adding the filter fixed the issue.

Option<&RenderLayers>,
),
With<Camera3d>,
>,
Copy link

Choose a reason for hiding this comment

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

I think this will prevent 2d cameras from picking 2d meshes

@aevyrie
Copy link
Owner

aevyrie commented Feb 23, 2024

The raycasting backend should be reporting the camera.order, which the picking plugin uses to sort hits. Do you have a minimal repro of the "unpredictable picking" bug with 2d/3d cams?

@aevyrie
Copy link
Owner

aevyrie commented Feb 24, 2024

It appears this is already fixed on main thanks to #293, which added OrthographicProjection to the sprite backend query. I've modified the existing sprite example with a 3d camera so we can test for this in the future.

@aevyrie aevyrie enabled auto-merge (squash) February 24, 2024 08:49
@aevyrie aevyrie merged commit 7cc9cbd into aevyrie:main Feb 24, 2024
7 checks passed
@skylerparr
Copy link
Contributor Author

Thank you. Sorry for the radio silence. I was dealing with a sick baby. I appreciate this library.

@skylerparr skylerparr deleted the 2d-and-3d-camera branch February 24, 2024 18:05
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.

3 participants