- Home /
Airplane follower camera script
Hello every one , I have an airplane that fly in 3d world , rotate & do all of the common airplanes works but my camera is a simple smooth follower and smooth look at don't rotate with my airplane in 3 directions & haven't any smooth rotate towards. Also I need a few seconds delay for rotating and moving but I don't know what should I do?
Comment
Show us what you have written so far so that we could help you. No one will write a script for you.
Best Answer
Answer by OpenCoffee · Apr 25, 2013 at 05:21 PM
If you would like to use a script where the camera follows the velocity of the player you could use mine which I used successfully for my glider game. You will have to modify it to work in your game ofc.
// Get the inverse of the players velocity
Vector3 direction = -(m_target.transform.rigidbody.velocity.normalized );
// Set the position of the camera relative to the player, with some distance and height
m_targetPosition = m_target.transform.position + (direction * m_distance) + (Vector3.up * m_height);
// Set camera position
transform.position = m_targetPosition;
// Let the camera look at the player
transform.LookAt( m_target.transform );