Page 1 of 1

CSGO: Calculate a distance from one player/entity to another

Posted: Mon Mar 25, 2019 3:43 am
by khaimovmr
Hy guys!
Does someone knows - is there a way in the source-python of calculating the distance from one player/entity to another?

Re: CSGO: Calculate a distance from one player/entity to another

Posted: Mon Mar 25, 2019 3:56 am
by L'In20Cible
khaimovmr wrote:Hy guys!
Does someone knows - is there a way in the source-python of calculating the distance from one player/entity to another?

Syntax: Select all

distance = player.origin.get_distance(entity.origin)

Re: CSGO: Calculate a distance from one player/entity to another

Posted: Mon Mar 25, 2019 9:15 pm
by khaimovmr
L'In20Cible wrote:
khaimovmr wrote:Hy guys!
Does someone knows - is there a way in the source-python of calculating the distance from one player/entity to another?

Syntax: Select all

distance = player.origin.get_distance(entity.origin)

Man, thanks a lot!