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

Teleport trace is skewed #108

Open
adosikas opened this Issue Aug 26, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@adosikas

adosikas commented Aug 26, 2017

The trace used for ulx teleport isn't consistent with the eye angle, as the endpos isn't shifted, while the startpos is. This leads to a slight, but annoying offset in expected teleport target.

Code in question: https://github.com/TeamUlysses/ulx/blob/master/lua/ulx/modules/sh/teleport.lua#L290-L291

I think it would make sense to make the offset half the player height (or whatever fraction is required for traceEntity to work properly), and apply it to both startpos and endpos, instead of hardcoding it to 32 on starpos and 0 on endpos. This would also allow it working correctly with rescaled players.

@Nayruden

This comment has been minimized.

Show comment
Hide comment
@Nayruden

Nayruden Sep 18, 2017

Member

Thank you for your input! Your suggestion combined with http://wiki.garrysmod.com/page/Entity/DropToFloor may do the trick.

Member

Nayruden commented Sep 18, 2017

Thank you for your input! Your suggestion combined with http://wiki.garrysmod.com/page/Entity/DropToFloor may do the trick.

@Nayruden Nayruden self-assigned this Sep 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment