-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Added viewport independent raycast #3709
Conversation
Hey @luis605, nice addition, but you mentionned "GetMouseRayEx" in the PR description, and it's named GetViewRay in the code. As you're using the parameter named mousePosition, I think GetMouseRayEx is better ;) |
Hi @Elkantor . I was talking to @raysan5 and @JeffM2501 and we thought GetViewRay was better named than Ex. |
@luis605 @Elkantor Merging but function name still under consideration... I checked Unity API (that is usually VERY good at naming) and they have: Do you know what naming is used in other similar libraries/frameworks/engines? |
* Update rtext.c * Add gamepad support to PLATFORM_DESKTOP_SDL (#3776) Co-authored-by: Arthur <[email protected]> * [rcore] Fix `GetFileNameWithoutExt()` (#3771) * Update rcore.c fix [rcore] GetFileNameWithoutExt * Update rcore.c * Update rcore.c * Update rcore.c * Update rcore.c * Update rcore.c * Update rcore.c * Update rcore.c * Update rcore.c * Update rcore.c * Update rcore.c * Update rcore.c * Review formating and some defines naming consistency * Added viewport independent raycast (#3709) * added viewport independent raycast * Renamed GetMouseRayEx to GetViewRay * Update raylib_api.* by CI * REVIEWED: `rlLoadFramebuffer()`, parameters not required * Reorder functions * Update raylib_api.* by CI * Update rtext.c (#3777) (#3779) * REVIEWED: `rlLoadFramebuffer()` --------- Co-authored-by: A <[email protected]> Co-authored-by: Arthur <[email protected]> Co-authored-by: oblerion <[email protected]> Co-authored-by: Luís Almeida <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
GetMouseRay
did not allow the user to cast a ray from the camera to the world view while in aviewport
orrenderTexture
. To improve raylib, I addedGetMouseRayEx
, which has new arguments (width and height), making it easier to cast a ray to a specific viewport.