In my project I am trying to create some trees in the far background. I wish to use an image on a plane to keep the poly count as low as possible. Could anyone please tell me what script is needed to billboard these planes and have them rotate to face the camera as the player moves?
Thank you
public void turnTo(Vector3 point) {
Vector3 direction = point - transform.position;
// Rotate towards the target
transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation(direction), AI.rotationSpeed * Time.deltaTime);
transform.eulerAngles = new Vector3(0, transform.eulerAngles.y, 0);
}
This will help you. But do not run this cript wen player to far. Best way is to use 2 playnes with out anu rotation scripts