How to Set the Actor rotation to Yaw in C++?

didn’t tried till now, will let you know if it works for me

yes, this worked and just needed a little modification due to the engine syntax, I am using the old one v4.20, the most stable and not buggy.

GetControllerRotation is undefined for me, and GetControlRotation did the job.

SetActorRotation(FRotator(0, GetControlRotation().Yaw, 0));

Thank You for sharing the knowledge and helping me in my study process.

Oh awesome! I’m just learning myself and so I don’t mind using the bleeding edge buggy stuff for learning only. :stuck_out_tongue:
(Though that was not an version issue, that was a typo on my part :P)
It’s also GetControlRotation for me too… WHOOPS! hehe.
I edited the original post in case others find it useful without the typos :stuck_out_tongue:
I’m glad you were able to get it working! Good luck on your journey! See ya around.

1 Like

ah, ok … I thought it was a version thing, I faced lots of this stuff in my journey :smiley:
Thanks, and Good luck to you , keep coding this is very fun and interesting, See ya )