Unity3d billboard 公告板技术

using UnityEngine;
using System.Collections;

public class LookAtCameraYRotationOnly : MonoBehaviour
{
public Camera cameraToLookAt;

void Update()
{
Vector3 v
= cameraToLookAt.transform.position - transform.position;
v.x
= v.z = 0.0f;
transform.LookAt(cameraToLookAt.transform.position
- v);
}
}

posted @ 2011-03-31 15:42  ultrasoon  阅读(1871)  评论(0编辑  收藏  举报