NokiMo
Megan Fox
Megan Fox

patreon


Soft Lock (aka Aim Assist)

Pretty straightforward! This is what controls our soft locking / aim assist. You could convert it for FPS without too much effort (at which point you'd call it aim-assist).

AttemptedHitOnTarget() in our code then utilizes our existing lock-on code to make a soft-lock on the target that immediately breaks once you've finished looking at it. If you were applying this to bullets, you could just make the bullet heat-seek the chosen target, or bent the bullet path, etc.

If we wanted to up accessibility, we'd increase ScaleUpAmount or put it on a slider. If you ramp that past a point, it will just find the nearest enemy and immediately let you punch it, even if it's behind you or under your feet. 

TargetsAboutTheSameDistance is what we use to try and pick the guy closest to you first. So we find the closest guy, then for anyone else who's about the same distance away, we pick the one closest to the direction you're looking at.

Soft Lock (aka Aim Assist)

Related Creators