var hasportal : boolean;
var portalblue : GameObject;
var camerapoint : GameObject;
function newportal () {
if (hasportal==false){
theportal=Instantiate(portalblue,transform.position,transform.rotation);
theportal.transform.eulerAngles.x=5;
theportal.transform.position.x=theportal.transform.position.x+1;
theportal.transform.eulerAngles.y=5;
}
}
This is a script which is received from another sendmessage script
look at where it says theportal.transform.eulerAngles.y or x =5;
How can we make it so that the Euler angle faces the gameobject (assigned as a camera), camerapoint. Much would be appreciated.