I'm developing an FPS shooter in Unreal Engine 5 and currently working on the aiming mechanics for keyboard and mouse (KBM). I want to implement an aim assist system that uses ray casting to detect potential targets and scales assistance based on the likelihood of a hit. This likelihood should factor in:
Player and target velocity
Momentum
Coordinates
Distance
I'm new to UE5 and C++ development in this context, and I’m struggling to figure out:
How to perform ray casting in UE5 using C++ to detect targets.
How to use collision detection to determine if a target is hit.
How to calculate a hit prediction likelihood based on physics parameters.
How to scale aim assist dynamically based on that likelihood.
I’ve searched Quora and Unreal Engine forums but haven’t found a clear guide or example. Any help with code snippets, best practices, or relevant documentation would be greatly appreciated!