Shooting range target

In a shooting range, there are targets where the closer you hit to the center, the more points you earn.

I have a similar model in UE5.4 and wanted to adapt this mechanic to my game. The closer you hit to the center, the more points you earn.

I managed to get this mechanic working well, but I’m having a small problem. Whenever I shoot at the boundary between two colliders, both point values register. I’ve tried to make it so only the first collider that the projectile hits registers before the bullet falls due to impact (which works most of the time), but when the colliders are hit ‘simultaneously,’ both values still get registered.

Any ideas on how to fix this?

(I know my blueprint is messy, but it’s what my UE5 noob brain could come up with, and it kind of works. If there’s any suggestion to also fix that and also reduce the amount of colliders I would appreciate it)




1 Like

You also have a bit of a problem, in that, if the bullet ends up in one of these sort of places

image

The player will score nothing.

What about just using the distance from the bulls eye? ( I know it’s not quite a circle, but it has to be better :slight_smile: )

My take on it; it’s a 100x100 plane you can scale however you want:

Massage those 2 values to align it with the texture.

That’s the entire script and no collision boxes. There’s probably a more mathematically elegant way to get those values but this is easy to edit.

2 Likes

It should do it. Just one problem in my end, when the projectile hits, no “points” show up, it keeps beign 0 anywhere I hit
image

Post script.

Oh nvm, I’m dumb forgot to connect the Round node to the Set Score

Thx a lot!

1 Like

Uh… another problem.

The code is basically the same (exept I made the OnHit be a box because the dimensions of the target are very goofy) but the vertical scoring is the same all around.
image

Looks like mixed up axes. Use a plane, attach it to front of the silhouette.

What clockwork suggest about measuring distance from the bullseye would be the best way to solve this id think. Placing one hit box for the entire target and one tiny box at the bullseye for a location holder. Calling “distance” on hit and using an equation to calculate points based on distance from bullseye

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.