"Set Actor Rotation" doesn't work

Hi there! :slight_smile:
I’m trying to make a blueprint of a function so that if the character walks into a box trigger and presses spacebar while in it, it automatically rotates the character so it faces the same (world) direction as the box trigger. I was able to figure out pretty much everything on how to do it, however my character does absolutely nothing when I press spacebar. I am able to get the specific yaw (for example -90) of the box trigger I’m standing in, but when I tried to apply the yaw to the new character rotation, it just doesn’t work :frowning: I’ve spent so much time trying to fix this already without any luck that I decided to try and get some help from you guys.
Included is screenshot from my blueprint of the first person character. The relevant part is the uppermost branch of the graph.
Can someone help me with this please? Thanks!! :slight_smile:

8 Likes

Have you narrowed down the issue?

Are all the branches going through?

Is the input firing?

Have you compared the Other Actor rotation with your player rotation?

Thanks for the reply!
I’ve been trying to solve this particular issue for half a day and I really tried everything I could think of. The input is firing, I tested that. Also when I connect “make rot” function to the “new rotation” of the “set actor rotation” with some random pitch, roll and yaw numbers, it does rotate the actor, but ONLY the pitch and roll work. It totally ignores the yaw amount for some reason.
And when I connect it like in the picture I posted, it ignores the rotation of the reference object altogether.

1 Like

Alright, did some testing and the issue is that setting the actor rotation does nothing because your character rotation tied to the PlayerController.

So, you need to rotate your controller.

That should do it, hope I made sense!

7 Likes

Thanks, but I can’t find the “Set Control Rotation” function, only “Set Actor Rotation” and with that it doesn’t work :confused:

1 Like

Even if you drag from the Get Player Controller? You could also turn off the “context sensitive” option at the top right when adding a node

Oh yeah, the context sensitive options needed to be turned off :slight_smile: It works now! Thank you!!

Awesome, could you set this as answered? Thanks :slight_smile:

The same issue occurs when the pawn you are trying to manipulate doesn’t have a camera within the class (rookie mistake, I know but that’s how i ended up at this post).

I know that I’m to late with the answer but maybe I will help some beginners.
The correct answer is: You are using Character as base class and probably you forgot to unselect “Use Controller Rotation Yaw”.

2 Likes

FYI, if you only need to add deltas then as of Unreal Engine 4.21, and maybe earlier, there’s are helpful blueprint nodes under Pawn> Input> Add Controller Pitch/Roll/Yaw Input. For example:

^^ , thank you man :smiley:

Thanks!