Get distance from ground
How to get distance from ground when player is in the air?
|
Re: Get distance from ground
Throws a traceline vertically from player's feet to the ground, retrieve the end position ; and get the distance using for example get_distance_f().
|
Re: Get distance from ground
Try this:
Code:
|
Re: Get distance from ground
unfortunately that will fail when the player is on/over an edge of a higher point
|
Re: Get distance from ground
I know that engine doesn't use same hull as dll for crouch players. But i've seen that dll has a way to tell the engine which hulls it is using.
So, finally, don't know if with TraceHull engine uses correct hull when player is crouched. So, do as if player was not crouched, can be a problem if player is right under a ceil. PHP Code:
|
Re: Get distance from ground
Quote:
To fix Connor's: Code:
|
Re: Get distance from ground
Yes, my bad, then we can remove useless stuff.
Also, should consider that returning 9999 means there is a problem ;) PHP Code:
|
Re: Get distance from ground
I can remove this? :)
PHP Code:
And what is the maximum height of the jump player? When I check - I'm get no more than 44.0 |
Re: Get distance from ground
Quote:
|
Re: Get distance from ground
why wont you just try?
|
| All times are GMT -4. The time now is 10:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.