hello all, I have a Camera on a path and I want textured planes (like billboards) to turn an face it
Using the Unity docs I have the foot of the plane facing the camera as it moves
no matter how I try to change the (forward & up) parameters I can’t get the plane up 90degrees to face the Cam.
I have been searching forums and would really like to understand it .
here’s my code:
Thanks
using UnityEngine;
using System.Collections;
public class rotateTowards : MonoBehaviour {
public Transform target;
void Update() {
Vector3 relativePos = target.position - transform.position;
Quaternion rotation = Quaternion.LookRotation(relativePos);
transform.rotation = rotation;
}
}