Kolopsel Posted January 19, 2018 Share Posted January 19, 2018 Hello, I wanted to know if there is some way to check if an Entity is visible on the Player's screen. There is a function called Ped.IsVisible but im not not sure if that is what i am looking for. Thanks, Kolopsel Link to comment Share on other sites More sharing options...
Jitnaught Posted January 19, 2018 Share Posted January 19, 2018 Use IS_ENTITY_ON_SCREEN if you want to know if the entity is on the screen but not necessarily visible. This means the entity could be behind a building and it would still return true. if (Function.Call<bool>(Hash.IS_ENTITY_ON_SCREEN, entity)){//do stuff} IS_ENTITY_OCCLUDED should check if the entity is actually visible on the screen or not, although there isn't much documentation on it so I'm not entirely sure how it works or how well it works. if (!Function.Call<bool>(Hash.IS_ENTITY_OCCLUDED, entity)){//do stuff} There's also raycasts. var result = World.Raycast(World.RenderingCamera.Position, entity.Position, IntersectOptions.Everything);if (result.HitEntity == entity){//do stuff} Bob_74 1 Link to comment Share on other sites More sharing options...