Need help with target lock system

If you restrict it based on up/down and left/right then you won’t get a target circle, you will get a target box.

You want to normalize your offsets and multiply them by the distance from the center (Pythagoras using your X and Y offsets) but clamp the distance to a maximum radius first. That will give you a new X and Y which should be good to use in a FindLookAtRotation.

Here’s the rub. You also appear to have another problem. You are using your offsets to modify a world position. In order to do that you need to get the offsets relative to the shooter. It’s not that hard, tho. Instead of just using your X and Y offsets, you want to get the up and right vectors of the aim rotation. Then multiply the X offset by the right vector and the Y offset by the up vector. That (and what I said above) will give you the right offsets to add to the world position and then find the look-at rotation.

When I say Pythagoras, the easy way is to use X and Y offsets to make a vector and get the length.

You’re welcome. If you run into problems, post your new blueprint code.

hi all,
I am trying to make a aiming lock system.
if the system is active, the cross hair will be restrict within a circle range around the target.
now I am trying to set the min/max view pitch and yaw.
but its always look weird.

this bp is used to get the min/max pitch and yaw rotator around the target

thanks for any help

thank you for your apply, i will try it.