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

[examples] Fix core_3d_camera_free #3488

Merged
merged 1 commit into from Oct 31, 2023
Merged

[examples] Fix core_3d_camera_free #3488

merged 1 commit into from Oct 31, 2023

Conversation

ghost
Copy link

@ghost ghost commented Oct 30, 2023

Changes

The free camera main issues were actually fixed on #3240, but I forgot to follow-up and finish/clean up the example (R68-R69, L74-L76).

Notes

@raysan5 IMHO, I don't think we should add/fix the Alt + Mouse Wheel Pressed to Rotate (L74), neither the (commented) Alt + Ctrl + Mouse Wheel Pressed for Smooth Zoom (L75) because, with the current camera setup, that would require hardcoding them on rcamera.h. IMHO, that would make the handling on rcamera.h needlessly complex just to accomodate this example. Please let me know if that's not the case, and they should be added.

Reference

#3487

Environment

Tested on Linux (Mint 21.1 64-bit).

Edits

1: added line marks; editing.

@raysan5 raysan5 merged commit d8accec into raysan5:master Oct 31, 2023
12 checks passed
@raysan5
Copy link
Owner

raysan5 commented Oct 31, 2023

IMHO, that would make the handling on rcamera.h needlessly complex just to accomodate this example. Please let me know if that's not the case, and they should be added.

@ubkp Agree. With the camera module redesign, some of the examples were not properly adapted and some previous features were removed in exchange of other features and better code organization.

In any case, it would be nice if that functionality could be moved to user side in some way, the example tried to illustrate a 3d free navigation system similar to the ones available on DCC packages (3dMax, Maya, Blender...)

@ghost ghost deleted the fix/examples-camera branch October 31, 2023 12:30
@ghost
Copy link
Author

ghost commented Oct 31, 2023

In any case, it would be nice if that functionality could be moved to user side in some way, the example tried to illustrate a 3d free navigation system similar to the ones available on DCC packages (3dMax, Maya, Blender...)

@raysan5 Oh, I thought it was "free" as in "noclip/spectate mode".

If it's ok, I'd like to give a try at reviewing the camera system (specially moving the camera logic to the user side and the examples teaching/suggesting how a camera could be implemented with them), but I don't think I can get this ready for 5.0.

@raysan5
Copy link
Owner

raysan5 commented Oct 31, 2023

If it's ok, I'd like to give a try at reviewing the camera system (specially moving the camera logic to the user side and the examples teaching/suggesting how a camera could be implemented with them), but I don't think I can get this ready for 5.0.

Sure, feel free. Actually with current camera module should be possible to implement the camera rotation on user side, using the available Camera*() functions.

There is also a UpdateCameraPro() available as a prove-of-concept of a camera control independent of inputs, allowing users to provide their own inputs for custom camera movement designs. core_3d_camera_first_person contains an usage example but probably a better example should be provided.

In any case, camera module is just provided for user convenience but updating Camera structure at user side should be enough for custom camera systems implementation (specially targeted to advance users).

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.

1 participant