Instead of comparing distance to object, you need to compare it to a number that represents (roughly) the size of the object. You’ll have to figure out this distance yourself, based on the size of objects in your game.
Instead of comparing distance to object, you need to compare it to a number that represents (roughly) the size of the object. You’ll have to figure out this distance yourself, based on the size of objects in your game.