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!

Features:

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: https://www.youtube.com/watch?v=173GAQve-7A
Part 2: https://www.youtube.com/watch?v=ACwaxNeV3z8
Part 3: https://www.youtube.com/watch?v=8p_xHdoNEeE
Part 4: https://www.youtube.com/watch?v=9eenQ7Z-qGk
Part 5: https://www.youtube.com/watch?v=CUfZ31tnAII
Part 6: https://www.youtube.com/watch?v=sr7mpXWELwE
Part 7: https://www.youtube.com/watch?v=TEwRQT_W3Ak
Part 8: https://www.youtube.com/watch?v=fH81b3YJk1o

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!