you needd to remap one range to another range.
Let’s take the following information:
- the (center) position of your target.
- the positions of your spread shots.
You measure the following situation:
- Shot 1 is 10cm up and 10 cm to the right of the target’s center position.
if you imagine the target’s most left position you want to measure as 0% and the most right position as 100%, you can say the shot is at X % horizontally of the target’s size. Do the same vertically. now you have mapped the shot position to a 0 to 100 range for both X and Y axis. You can use the percentage to modify your UI per shot.
Instead of say spawning a “dot” widget for every shot maybe someone can come up with a fancy shader for the UI. Unreal’s UI is horrible on performance with these kind of things.