Some question about character's position and rotation

contac

Member
For some reason i wanna rotate the character first, and the camera will follow the character smoothly after.

So i paid kinds of time to learn the code you write about the position.

I confused that, i can't understand the logic about it:

1.FixedUpdate

1586429695714.png


2.SmoothUpdate

1586430304974.png
 
What is the reason that you want to update the camera first? This will take a lot of modifications in order to do correctly as the controller was designed to update the controller first and then move the camera into the correct position.
 
What is the reason that you want to update the camera first? This will take a lot of modifications in order to do correctly as the controller was designed to update the controller first and then move the camera into the correct position.
Thanks for your reply. I just need to rotate the character with the input directly, and i want a smooth camera follow it. (Combat mode)
I have an idea that i rotate the character in fixedupdate without smooth, and i make it seem's smooth by camera using Cinemachine.
I will take a try, and i'm waiting for Version2.2 to see if it can give me some other ideas about smooth moving.
 
Finally i achieved it, and don't change a lot.
First, i don't use the damping of position and rotation of CameraTarget, so the CameraTarget can move and rotate directly with the input.
Second, i set the Camera moveTowards CameraTarget.
 
Top