Is ojbect visisble in screen (by angle).
I have a little problem. I have player position (pev_origin plus pev_view_ofs - lets name it Float:fEyePos[3]), player angle (am using pev_v_angle to be more accurate - Float:fAngle[3]), and I have a position in the world (Float:fPos[3]).
Now is there a really good way to check if Float:fPos[3] is visible on players screen with support of pev_fov (ignoring objects what can block visibility of that position)? I tried: PHP Code:
I also tried: PHP Code:
--- Now I wonder, can anyone help me by giving the right and working calculation for this? |
Re: Is ojbect visisble in screen (by angle).
No one? Seriously?
|
Re: Is ojbect visisble in screen (by angle).
is_in_viewcone only take in account horizontal view, you would have to implement it with Z origin checks.
Check for last opened thread about in_view_cone. |
Re: Is ojbect visisble in screen (by angle).
nvm :p
|
Re: Is ojbect visisble in screen (by angle).
Quote:
horizontal check doesn't check the edges properly (as if fov is 85 and not 90). Z check works as if fov is 100 and not 90). |
Re: Is ojbect visisble in screen (by angle).
You may be interested by that : http://forums.alliedmods.net/showthread.php?t=135841
|
Re: Is ojbect visisble in screen (by angle).
Thanks guys for your help. But I already contacted someone who gave me 100% accurate calculation. I personally call him an alien (lol :D ). Anyway, get ready - soon a plugin with really hardcore calculation will be submitted by me. :D
|
Re: Is ojbect visisble in screen (by angle).
You could also use CHR Engine's get_hudmessage_locs stock, which returns 0 if the origin isn't on the ent's viewcone.
|
| All times are GMT -4. The time now is 10:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.