I’m looking for way to compare player contol rotation with my custom rotator value.
I’m trying to set max and min yaw camera value in my game (static turret)
There are a few ways to limit Camera or Player rotation.
In Blueprints , you can make use of the Camera Manager:
Another way would be to create a custom “Camera Manager” Class : Easy way(Open the Player Controller , and create one under Defaults)
And under the Defaults of the new created Camera Manager Class , you have access to the rotation limits.
Thanks so much, Ockertvs! Your solution worked perfectly. I really appreciate you taking the time to answer the poster’s question as it has helped others, too!
I d like to set my yaw depending of the character forward vector and not world rotation.
It s a FPS and i m doing a climbing feature so i want to lock my yaw but the camera manager set it depending to the world.
I can t find anything about it on google…
hey, I’m totally new to EU and I’m doing an FPS with a climbing feature too !
so I did this with a lot of research, and it works pretty well.
ps : the link to the left comes from envent tick
I hope I was helpful
I solved it, if u needs help, message me!
For anyone looking into this, another solution could be setting dynamically the min and max yaw inside the player camera manager.
Create a custom Player Camera Manager
Get a refence to the character on the begin play (no need to cast to a specific character)
In the tick event of the camera manager get the actor rotation and set View Yaw Min and View Yaw Max subtracted or added with you’re value, in the example the Yaw is limited to 90 degrees to the left and 90 degrees to the right from the current rotation of the character.
This doest work for me, depending on how my climbing thing is rotated the camera will be facing either up or towards the climbing thing