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

Fix all S2D/Camera mismatches between window size and engine size #1191

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RigidStudios
Copy link

Mouse event positions are currently relative to the window - they should most likely be relative to the width/height of a scene.
This has not been tested against all features, just Interactives.

@Yanrishatum
Copy link
Contributor

Note: This is an issue arisen from s2d not expecting Engine render resolution mismatching Window size, we discussed it in Discord and proper solution will be presented, do not merge yet.

@RigidStudios RigidStudios changed the title Fix S2D event collisions for ScaleMode case Fix all S2D/Camera mismatches between window size and engine size Feb 8, 2024
@RigidStudios
Copy link
Author

@ncannasse This is ready for review

@clementlandrin
Copy link
Collaborator

Hello, in case of a manual call to h3d.Engine.resize(), h3d.Engine.onResized() is not called, thus h2d.Scene.checkResize() is not called either and the mismatch will persist.
I think the h3d.Engine.resize should be called at each h3d.Engine.onWindowResize and the check
if( w != width || h != height )
should be used to prevent the call to driver.resize only. Then the dynamic onResized can be moved at the end of the resize function.

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.

4 participants