Smart(er) Targeting System for RPG Style Lock-on

CHECK OUT THE PART 9 FINALE, it showcases the fully functional tab target system now! The system keeps you from retargeting the same target and even forgets old targets, that you’ve targeted, after a time period!


Target Priority Order System:

  1. Straight line trace targeting(only works when zoomed in)
  2. DOT product(how closely you are looking at something) targeting from the camera
  3. Horizontal dot product targeting based on character orientation
  4. Radial proximity target locking

-Breaks target on max range
-Breaks target after being out of line of sight for too long
-Tab target functionality that tries to make sure you don’t target the same target over and over
-A system that slowly forgets previously targeted actors
-Basic fresnel shader that pulsates and overhead target arrow that bobs up and down; to indicate selection
-Probably more that I’m forgetting

I also shows a lot of tips on optimization and how to not tank your performance with unnecessary usage of things like “get all actors of class.” Anyways, check it out and feel free to leave me questions or comments. It’s a lot easier for me to answer and explain things on here though!

Part 1:
Part 2:
Part 3:
Part 4:
Part 5:
Part 6:
Part 7:
Part 8:

Amazing =D !!
All i even needed

Thanks, glad I could help!

Make sure to check out part 8 for the almost completed version of it because it’s considerably smarter now! I still plan on adding in a system to handle keeping track of who you’ve recently targeted and that will also allow you to tab through targets without unlocking. I should be able to knock that out soon; time permitting.

Also, I forgot to say that I might want to add in a slightly different sorting algorithm for the camera soft targeting. I’m thinking of putting in a range check if two targets are kind of lined up. It would take a few modifications, but might fix some potential outlier situations.

I’ll keep waiting

Updated with the part 9 finale guys!

Just wanted to let you know, years in the future, this was a big help.
Thank you!