Raised This Month: $51 Target: $400
 12% 

Distance to ground


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kowalsky
Senior Member
Join Date: Mar 2015
Location: Poland
Old 03-12-2016 , 16:42   Distance to ground
Reply With Quote #1

Is there any efficient stock to determine distance to ground from the entity's origin? Currently I am using traceline native to achieve that. Basically I get origin of the entity, substract around 8000 from Z axis (origin[ 2 ] -= ..), do the trace line native and finally get hit origin. Then I can determine distance to ground by vector_distance. Is there anything more efficient?
Kowalsky is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 03-13-2016 , 06:24   Re: Distance to ground
Reply With Quote #2

That's good. Even pfnDropToFloor (EngFunc_DropToFloor, drop_to_floor) does it in a similar way, but still does tracing.
klippy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode