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

magnum + wxWidgets sample projects, mouse drag can rotate the camera, but not as expected #27

Open
asmwarrior opened this issue Jul 18, 2021 · 1 comment

Comments

@asmwarrior
Copy link

Hi, I try to implement a magnum + wxWidgets sample C++ projects by using the msys2.

I just copy and modify the code:

https://github.com/mosra/magnum-examples/blob/master/src/mouseinteraction/MouseInteractionExample.cpp

Since it use the SDL as the main GUI, I just translated all the GUI related code to wxWidgets, the main GUI shows correctly, but I found an issue that the mouse drag can rotate the camera/scene, but not as expected as the webgl one shown in the Mouse In­ter­ac­tion Ex­am­ple, can any one help me.

I'm not quite understand how the matrix calculation works for the mouseinteraction example project.

My project is in https://github.com/asmwarrior/magnum-wx

Thanks.

@asmwarrior asmwarrior changed the title magnum + wxWidgets sample projects, mouse drag can rotate the camera, but not not expacted magnum + wxWidgets sample projects, mouse drag can rotate the camera, but not as expacted Jul 18, 2021
@asmwarrior asmwarrior changed the title magnum + wxWidgets sample projects, mouse drag can rotate the camera, but not as expacted magnum + wxWidgets sample projects, mouse drag can rotate the camera, but not as expected Jul 18, 2021
@asmwarrior
Copy link
Author

rotation_error

I have upload the screen cast gif of the rotation, I just use the left key drag horizontally.

Note that the code is 1:1 map from the code: MouseInteractionExample.cpp

The expect behavior is that the rotation should around the center of the triangle (the origin point (0,0,0))

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

No branches or pull requests

1 participant