-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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] Update core_3d_camera_first_personCamera #4221
Conversation
Can attest that I did wonder about SPACE and LCTRL several months ago when started to learn RayLib. Thought they were for jumping and sneaking, but were broken. :) Never realized they were for free camera. |
I think this has way too many changes that aren't necessary. Why not display different controls based on the camera mode and leave it at that? Or something |
@CrackedPixel For me its just makes it more consistant that each mode can zoom. And it stops the free camera being the same as the first person camera. I updated the pr to include your idea of displaying different controls. based on camera mode. I still think adding zooming to the first-person mode makes sense but I comment it out for now. |
////Camera zooming | ||
//float wheelMove = GetMouseWheelMove(); | ||
//bool zoomIn = IsKeyDown(KEY_KP_ADD); | ||
//bool zoomOut = IsKeyDown(KEY_KP_SUBTRACT); |
Check notice
Code scanning / CodeQL
Commented-out code Note
//if (cameraMode == CAMERA_FIRST_PERSON && (wheelMove != 0 || zoomIn || zoomOut)) | ||
//{ | ||
// if ((wheelMove > 0 || zoomIn) && camera.fovy >= 20.0f) | ||
// { | ||
// camera.fovy -= 5.0f; | ||
// } | ||
// else if ((wheelMove < 0 || zoomOut) && camera.fovy <= 90.0f) | ||
// { | ||
// camera.fovy += 5.0f; | ||
// } | ||
//} |
Check notice
Code scanning / CodeQL
Commented-out code Note
@kai-z99 why that code is commented? Add it or remove it. |
@raysan5 I was wondering if you would rather have that feature or remove it? |
@kai-z99 in that case, I prefer to leave the example as it is. |
Regarding issue #4208 for core_3d_camera_first_person.
It doesn't mention that SPACE and LCTRL only work in CAMERA_FREE mode. So I added some text to clarify. Im not sure if adding functionallity to SPACE AND LCTRL was the intention for CAMERA_FIRST_PERSON, CAMERA_THIRD_PERSON, and CAMERA_ORBITAL? Because that would make CAMERA_FREE and CAMERA_FIRST_PERSON function identical if im not mistaken?
Also it never mentions that the zoom functionality is not availible in CAMERA_FIRST_PERSON, so I propose the change that zooming in CAMERA_FIRST_PERSON changes your fovy which mimics how zoom works first-person gameplay. It just resets back to the default value of 60.0f once you change cameraMode. That will make CAMERA_FIRST_PERSON differ a little more from CAMERA_FREE.