赞
踩
unity 场景中图标始终面向相机
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class IconFollow : MonoBehaviour {
//Quaternion direction;
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if(Camera.main&& Camera.main.gameObject.activeSelf)
{
transform.rotation = Camera.main.transform.rotation ;
}
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。