Rotate player to camera direction when using cinemachine FreeLook Camera
Currently, I'm using Cinemachine FreeLook camera to create the 3rd person vỉew for my game as I want the camera to rotate along with player not only on y axis but x and z axis as well.
I tried using Virtual Camera with 3rd Person Follow but it wont rotate as I wanted. And now I tried to make the player to rotate and look at camera direction all the times. But my code only make the camera rotate around the player everytime I move my mouse
float yawnCamera = maincamera.transform.rotation.eulerAngles.y;
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(transform.rotation.x, yawnCamera, transform.rotation.z), turnSpeed * Time.deltaTime);
So is there anyway can I make my character to rotate to camera direction or other solution to keep camera rotate with player at all direction
Your answer
![](https://koobas.hobune.stream/wayback/20220613043847im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Fixing camera for when player is oriented upside down or otherwise. 0 Answers
Trying to connect camera movement with player AND mouse 0 Answers
Making the player the camera's axis of rotation. 0 Answers
I'm having issues with collision and Physics 1 Answer
How to stop camera from moving when the player dies (2D)? 1 Answer