I am trying to find the locations of all the entities (Vehicles, Peds, Props etc) which are visible on screen. I have tried using
and tried to vary distance from 150 and sometimes it happens that some visible entities don't fall in this range of distance so cant find their position. And sometimes it happens that I get positions of entities which are fully occluded by some object like building or car etc.
Has anyone have worked on something similar before or could help me here? I would really appreciate that.