Raised This Month: $ Target: $400
 0% 

detecting if skybox is straight above?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
diamond-optic
Veteran Member
Join Date: May 2005
Old 04-12-2008 , 02:45   detecting if skybox is straight above?
Reply With Quote #1

whats the best way to check if an origin (like the origin of a given player) is below the skybox? (as in they are outside of any buildings)

i know to use pointcontents but not sure the best way to do it
__________________
diamond-optic is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 04-12-2008 , 16:03   Re: detecting if skybox is straight above?
Reply With Quote #2

Do a TraceLine above player, check for difference: trace_vecEndPos_Z - player_absmax_Z. That difference value shows how far player's head from the roof/sky. For example if it's equal to 0.0 and vecEndPos content is SKY then the player is right above sky.
VEN 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 06:23.


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