Quantcast

Jump to content

» «
Photo

Positions of entities visible

1 reply to this topic
mmuaz
  • mmuaz

    Player Hater

  • Members
  • Joined: 25 Sep 2017
  • Germany

#1

Posted 04 October 2017 - 04:31 PM

I am trying to find the locations of all the entities (Vehicles, Peds, Props etc) which are visible on screen. I have tried using 

World.GetNearbyPeds(Game.Player.Character, 150.0f)

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. 


LeeC2202
  • LeeC2202

    Mark Chump

  • Members
  • Joined: 24 Oct 2015
  • United-Kingdom

#2

Posted 04 October 2017 - 07:16 PM

These might help, I've never used them mind you so I don't know how reliable they are.

 

BOOL IS_ENTITY_ON_SCREEN(Entity entity)

BOOL IS_ENTITY_OCCLUDED(Entity entity)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users