in_view_cone of entity
I tried to detect if player is in front of the entity.
I used in_view_cone & distance to check. The distance was fine but in_view_cone didn't detect player. PHP Code:
|
Re: in_view_cone of entity
How about using fm_is_visible?
|
Re: in_view_cone of entity
Quote:
I did change V_Angle => ViewOffset to test it. (I get my ViewOffset data to set for NPC, not just change V_Angle to ViewOffset) |
Re: in_view_cone of entity
in_view_cone() + visible check should be enough.
Have you confirmed the correct 2 player variables are used to get the origins? |
Re: in_view_cone of entity
TIP : when you're using is_wall_between_points in zombie think set the third Param the zombie entity index to ignore the zombie otherwise it might give you always false results. Since also when you're creating the zombie you dont give him the monster flag.
|
Re: in_view_cone of entity
Quote:
PHP Code:
Code:
Eye Origin: 1698.0, 2137.0, -1907.0PHP Code:
PHP Code:
is_wall_between_points work normally because of my previous code, it did not dectect when I behind object. Quote:
|
Re: in_view_cone of entity
Is bRunning definitely false?
g_PlayerID and ent are the correct player ID's? Did you identify which of fm_is_visible(), fm_is_in_viewcone, and is_wall_between_points() is not working as expected? |
Re: in_view_cone of entity
Quote:
bRunning was false at that time, when I run, the zombie did change state and chase. So it is nothing wrong with bRunning is_wall_between_points work normally because of my previous code, it did not dectect when I behind object. both fm_is_visble and fm_is_in_viewcone didn't work when I tested it previously. Either separated and together |
Re: in_view_cone of entity
Try something like this to identify specifically what is not returning as expected
Code:
|
Re: in_view_cone of entity
https://i.imgur.com/vRiNccs.png
Code:
Is running? 0Code:
Is running? 0Code:
Is running? 0https://i.imgur.com/P7EBFkh.png Code:
Is running? 0Edit: For running function testing: https://i.imgur.com/jw7rzew.png Code:
Is running? 1 |
| All times are GMT -4. The time now is 17:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.