Question by
okaybj · Jan 04, 2021 at 02:47 PM ·
first person controller
lerp yaw and pitch from x to 0
when my player hits a certain trigger i want my first person controller to smoothly look forward. here is what I have so far.. but it snaps to 0 instead of smoothly
if (player.move_forward == true)
{
yaw += speedH * Input.GetAxis("Mouse X");
pitch -= speedV * Input.GetAxis("Mouse Y");
}
else
{
yaw = 0f;
pitch = 0f;
}
Comment