Raised This Month: $ Target: $400
 0% 

bool:IsEntVisible


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 12-05-2015 , 19:29   Re: bool:IsEntVisible
Reply With Quote #1

I don't find this useful (and somewhat wrong and confusing) for the following reasons:

-It requires smlib
-The player's abs origin is at his foot, giving you a falsely false result most of the time (you define this as the default origin to use)
-To elaborate on that, you're also using the abs origin of the target entity (regardless of the ground hit issue, on bigger objects this can lead to issues)
-I haven't looked up if the mask triggers on hitbox or on vphysics collision (and stuff like glass), but imagine a different scenario based on a small entity just happening to be between the players.

I have the following suggestions to make this useful to others as a snippet:

-Remove the smlib requirement
-Add in a fov check before the trace ray (because it's a snippet and you don't know how many times random AM user xyz may call this)
-Make the trace ray optional (because a simple fov check might be just as useful)
-Maybe make it being hit only by world (and maybe bigger props?)
-Pick better starting/end points. (Either eye positions for clients or hitbox midpoints for entities)
-Instead of end points, just use the client's eye-angles. Imagine a player being half-way behind a wall with the end position being obscured by it, even though the player can be seen?
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House 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:37.


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