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 rcamera.h issues #3240

Merged
merged 1 commit into from Aug 11, 2023
Merged

Fix rcamera.h issues #3240

merged 1 commit into from Aug 11, 2023

Conversation

ghost
Copy link

@ghost ghost commented Aug 11, 2023

This PR address part of "REVIEW: Example: core_3d_camera_free. Displayed controls do not match and camera behaves strangely." from #2952.

  1. Fixes CAMERA_FREE behaving strangely (unintended rolling while yawing and pitching) by setting rotateUp to false (R439). This change does not impact the other cameras, because rotateUp is already false for them.

  2. Fixes CAMERA_FREE mouse wheel zoom by adding it to the zoom mode check (R503).

  3. Adds pan to CAMERA_FREE by adding handling for it before mouse and keyboard handling (R462-R472) and a define for CAMERA_PAN_SPEED (R187).

  4. Readds up (Space) and down (Left Ctrl) movement to CAMERA_FREE (R496-R500). This change does not impact the other cameras because it was already disabled for them.

Tested these proposed changes successfully on PLATFORM_DESKTOP on Linux (Linux Mint 21.1 x86_64) and PLATFORM_WEB.

Edit: added line marks.

@raysan5 raysan5 merged commit c25b52b into raysan5:master Aug 11, 2023
12 checks passed
@raysan5
Copy link
Owner

raysan5 commented Aug 11, 2023

@ubkp Nice! Thank you very much for the improvement! :)

@ghost ghost deleted the fix/rcamera branch August 11, 2023 13:22
@ghost
Copy link
Author

ghost commented Aug 11, 2023

@raysan5 Still on this topic, the core_3d_camera_free displayed control mentions "Alt + Mouse Wheel Pressed to Rotate" (L74), but I don't understand this one. Isn't that the same as just moving the mouse? Do you remember what it meant by that?

@raysan5
Copy link
Owner

raysan5 commented Aug 11, 2023

@ubkp Mouse wheel was possible to be pressed as an additional button, actually the control scheme was the same one used by 3d max and other 3d softwares to navigate the scene.

In any case, camera does not necessarily follow those controls, new ones could be added and the text changed for consistency.

@ghost
Copy link
Author

ghost commented Aug 11, 2023

@raysan5 Got it. Thank you very much for the explanation.

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.

None yet

1 participant