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 funcs for local position/angles and add Entity:setLightingOriginEntity #1910

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Advers
Copy link
Contributor

@Advers Advers commented Nov 24, 2024

Adds a few new ent and hologram functions for setting and getting local transformations, tends to be significantly faster than doing Entity:setPos(Parent:localToWorld()) and has very little precision loss by comparison

Also adds Entity:setLightingOriginEntity which can be useful as a sv function to stop some models from becoming black due to their lighting origins slipping underground

@Advers
Copy link
Contributor Author

Advers commented Nov 24, 2024

Right now setLocalPos doesn't use SF.clampPos because it seemed like trying to use an invalid/too large vector simply did not do anything. If there is some sort of problem, it can be added

@Advers
Copy link
Contributor Author

Advers commented Nov 24, 2024

There is also no check for if the entity has a parent since SetLocalPos and Angles will just act like their world coordinate counterparts when there isn't

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