- Home /
Question by
commodore · Jun 25, 2012 at 05:34 AM ·
camerasmoothfollow
Ideas for getting SmoothFollow camera to follow right behind?
Hello, so I have the SmoothFollow script attached to my camera with a few tweaks so that it stops following the character when he's in the air and when he's on rails. Right now the camera stops following him at the angle that he took off from. Here's the script along with a video of what I mean. You can see that the camera is not dead on.
//The rest of the SmoothFollow script is exactly the same except for this if statement I added.
if(turning.isGrounded && !turning.onRail)
{
currentRotationAngle = Mathf.LerpAngle (currentRotationAngle, wantedRotationAngle, rotationDamping * Time.deltaTime);
}
Comment