I’m trying to make it that when the player aims their gun, they will turn towards the closest target to them.
I have a Blueprint called BP_HorrorTarget, a character that’s a modified version of the ThirdPersonCharacter, and all the input setup to aim and shoot and whatnot.
So if you look at the first (UE_LookAtCalc.PNG) image, it’s looping through all the BP_HorrorTargets in the scene, finding the closest one, getting the location, and calculating the look at rotation, then finally tries to set the rotation (as you can see, I tried both SetActorRotation, and SetWorldRotation), which is the point that doesn’t seem to be working.
I’ve printed out each step and it looks like it’s getting the right rotation, it’s just not applying it.
I included the aiming input (UE_Input.PNG) and the modified movement section (UE_Movement.PNG) just in case something in there is causing this not to work. The only thing I can think is that InputAxis MoveRight is ticking so much that it’s overriding my LookAt, but I tried breaking InputAxis MoveRight and it still wasn’t working.