Can player reach entity?
Posted: Wed Dec 20, 2017 11:47 am
I can't find any function that would tell me if player can reach the entity he is pointing at.
Currently im using this:
is there any function doing this?
Currently im using this:
Code: Select all
if player.reach_distance >= math.abs(entity.position.x - player.position.x) and
player.reach_distance >= math.abs(entity.position.y - player.position.y) then