I’m creating a third person melee game and I’m trying to replicate the way that God of War automatically snaps the player character to enemies if they’re within a certain range and radius of them. Jason DeHeras has a quick video of this feature in this tweet
I’ve seen another post about this and the only response was:
“On Melee Attack Overlap Sphere to get Potential targets in desired Range (Sphere Radius)
Filter out Potential targets that are not in certain Angle in front of you or where your Input Direction goes to or any other filtering you want to do (Math)
Get the Closest one (Math)
Interpolate towards Target (you might want to have a little offset from him too) or do a simple forward attack if no closeby Target was found.”
It sounds like that would work but since I’m relatively new to UE4, I don’t actually know how to go about doing this, specifically the “Filter out Potential targets that are not in certain Angle in front of you or where your Input Direction goes” part.
Any help would be greatly appreciated.