Unity 2021.1.15f1
Using a 2D Hotspot's proximity toggle set to 1, correctly requires the player to move up to the hotspot when attacked from the left or the right along the X. It appears it does not take into account any verticality along the Y, as long as the X position is within proximity, no matter the actual distance, the player still preforms the action.
This is quickly reproduced using Demo2D, altering the use function on the worm, replacing the walk to point with proximity instead. Positioning the character directly above the worm, the furthest up possible. Even extending the navmesh well beyond normal bounds upwards away from the worm has the same effect.
Does proximity not take into account the Y axis?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Goneuser.
You're quite right. The y-position is read differently to avoid issues in 3D games. However, this should not occur in 2D games - I shall correct this, thanks for the report.
In the meantime, you should be able to apply a temporary remedy by commenting out the line:
In AC's PlayerInteraction script.
Thank you for the quick reply. Commenting out the line resolved the behavior.
Also, I'm not sure if this is the intended functionality. But if you disable the player's movement through an action list. The player will preform interactions on hotspots no matter their proximity.
As intended - otherwise Hotspots wouldn't be able to be interacted with.
I was operating under the assumption that, with proximity minimum distance checked on, it would only run the Interaction once within proximity. And not being within proximity would not proceed with the interaction.
The tooltip of Set minimum distance? isn't clear in that regard, so I thought I would mention that. But if this is intended, all good. Thanks!