How to get camera rotation relative to capsule or player mesh?

Hi,

I’m trying to make my character turn his head with the camera. If the camera gets past a certain angle, the character should look to the middle again.

This now works perfectly if the character is facing the default way. If the character faces a different way, the camera angles that I get are different (because they are relative to the world) and it works incorrectly.

I’m getting the camera angles through World Rotation, which is the problem. How can I get the camera angle relative to where the Player model or capsule is facing?

fixed it with this (the answer by Furroy)

https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/27315-determine-actor-direction-in-relation-to-the-camera