- Home /
How do i get a camera to follow a Bird/Plane smoothly?
Hey There! Im looking for a script or a way to smooth out the rotation between the current camera and a Object to follow (A bird in my case). I tried placing the camera with the target forward, camera offset and some distance, I tried lerping the camera position but i didnt achieve what I wanted. This is an example of how i want it to be: https://www.youtube.com/watch?v=QmPw47dPHc0 . It seems like the camera makes as few changes in position as possible, and it has a lookat(target). Maybe the bird rotates around the camera? Maybe theres a sphere around the bird and the camera is projected onto a specific point on the Sphere. Can anybody help me achieve the same or a similar effect?
Answer by sacredgeometry · Dec 07, 2020 at 02:47 PM
I think whats happening is that there is a lag between the bird movement and the camera movement.
How about using SmoothDamp like this?
Answer by zN30Nz · Dec 07, 2020 at 03:03 PM
Update: So i managed to get pretty close to the camera movement shown in the video. I created an empty object, and added my birdcharacter as a child. Then i set the local z coordinate of my bird to like 15. Now if i want to rotate the bird, i rotate the empty object. You could say i set a new empty object as a parent and used it as a pivot point for rotation. The camera will lerp the between the current camera position and the empty object / pivot point. Also, the camera has to have a Lookat or some other function to look in the direction of the bird. I also made the bird child object rotate localy until a clamped predefined angle. You can cantact me if you want to know more about it :)