Hello,
I’m trying to create a lock on system that allows me to cycle through potential targets.
Right now I have targeting and locking-on working fine. I click the right thumbstick button to find the closest enemy within my lock-on range and set them as the target.
How I would like it to function is by taking the horizontal direction of the right thumbstick and searching “within” that direction for a new target that is the closest to the current target. Think about it as a top-down 2D version of Dark Souls/Bloodbornes/Niohs targeting system.
I can’t think of an elegant way to achieve this. I’ve tried a few things but they’ve given very unpredictable results.
Any ideas?