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

Solved StartTouch/EndTouch detection on trigger brushes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 06-23-2017 , 18:14   StartTouch/EndTouch detection on trigger brushes
Reply With Quote #1

After following this tutorial: https://forums.alliedmods.net/showthread.php?t=129597

Apparently if I hook it like so:
Code:
SDKHook(entity, SDKHook_StartTouchPost, StartTouchPost);
SDKHook(entity, SDKHook_EndTouchPost, EndTouchPost);
The bounding box of the trigger appears to be larger by 16~ units (in CS:S), but according to someone, the trigger brushes will trigger StartTouch even if one part of my model touches the trigger.

If it's true, is there anything I can do to make the triggers only trigger StartTouch when my model's absolute origin touches the trigger?

Thanks.
__________________
retired

Last edited by shavit; 06-23-2017 at 18:38.
shavit is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 06-23-2017 , 18:27   Re: StartTouch/EndTouch detection on trigger brushes
Reply With Quote #2

Just change trigger size by playermodel width / 2 so that when player leaves zone completely, it'll be as if only origin left.

https://github.com/Zipcore/Timer/blo...sp#L3964-L3970
hmmmmm is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 06-23-2017 , 18:31   Re: StartTouch/EndTouch detection on trigger brushes
Reply With Quote #3

Quote:
Originally Posted by hmmmmm View Post
Just change trigger size by playermodel width / 2 so that when player leaves zone completely, it'll be as if only origin left.

https://github.com/Zipcore/Timer/blo...sp#L3964-L3970
Oh, thanks for that! Do you happen to know if the player model's width is 32.0 in both CS:S and CS:GO?
__________________
retired
shavit 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 20:24.


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