I have several copies of the same object, which I divided with a private variable with a number. I need a character to interact only with the one that is closer to the player. For this I created a private variable that calculates the distance between the player and the object. But as it is now to make the object, for example, when I press the delete is the closest object to it?
Develop games in your browser. Powerful, performant & highly capable.
You can use the "Pick nearest" condition to save the closest object's UID in a variable, then check if the UID of the object you click is the same as the one stored in the variable.