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

Add render.getViewSetup #1854

Merged
merged 5 commits into from
Sep 26, 2024
Merged

Add render.getViewSetup #1854

merged 5 commits into from
Sep 26, 2024

Conversation

marchc1
Copy link
Contributor

@marchc1 marchc1 commented Sep 19, 2024

Adds render.getViewSetup()

@marchc1
Copy link
Contributor Author

marchc1 commented Sep 19, 2024

The main data I need is the origin and angles; the other stuff is nice but not necessary for my use case, hence getViewPosAndAngles (since I'd prefer to run this in a rendering hook)

@marchc1
Copy link
Contributor Author

marchc1 commented Sep 19, 2024

By the way just so it's clear eyePos and eyeAngles do not serve my purpose here as they have been coded to use LocalPlayer():EyePos() rather than the EyePos() function. So they won't get the eye position and angles from a CalcView override.

@thegrb93
Copy link
Owner

You can make the getViewSetup function return a struct wrapper. Then the other function can be removed.

lua/starfall/libs_cl/render.lua Outdated Show resolved Hide resolved
lua/starfall/libs_cl/render.lua Outdated Show resolved Hide resolved
lua/starfall/libs_cl/render.lua Outdated Show resolved Hide resolved
@thegrb93
Copy link
Owner

Need to test this while using calcview to see if my comment update is true. I just gave it my best guess.

@thegrb93 thegrb93 merged commit 38379b6 into thegrb93:master Sep 26, 2024
1 check passed
github-actions bot added a commit that referenced this pull request Sep 26, 2024
* Add render.getViewSetup

* Add this too

* oops

* Update render.lua

* Update render.lua

---------

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net> 38379b6
github-actions bot added a commit to Advers/StarfallEeeeeeeee that referenced this pull request Sep 27, 2024
* Add render.getViewSetup

* Add this too

* oops

* Update render.lua

* Update render.lua

---------

Co-authored-by: thegrb93 <grbrown93@sbcglobal.net> 38379b6
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.

2 participants