Need help with LookDirection

Anton

New member
Help me solve a simple problem.
1) I need to keep the current camera LookDirection of the player.
2) After creating a new player, set this LookDirection for him.
I just can't find the method in the scripts.
 
You can get LookDirection from the CameraController, store the direction in a variable then apply it as a rotation to the character's facing direction.
 
You're using a first person view, right? You could use that for sure, although it might be easier to use UltimateCharacterLocomotion.SetRotation(...), since that takes a Quaternion.
 
Ah okay, so you want the camera's rotation to be separated from the character's look direction then? In that case yeah, I'd say use Rotate (you can probably just get the horizontal and vertical angle in degrees from the rotation you've stored). And you'd need to make sure to remove the anchor from the CameraController.
 
Top