Skip to content
Permalink
cf3c2727ef
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
17 lines (15 sloc) 509 Bytes
using UnityEngine;
using System.Collections;
public class CameraTest : MonoBehaviour
{
//public Camera m_Camera;
void Start () {
GameObject cam_H = GameObject.Find("Main Camera");
}
void Update()
{
GameObject cam_H = GameObject.Find("Main Camera");
transform.LookAt(transform.position + cam_H.transform.rotation * Vector3.back, cam_H.transform.rotation * Vector3.up);
//m_Camera.transform.rotation * Vector3.back, m_Camera.transform.rotation * Vector3.up);
}
}