VZ/Assets/Scripts/UICamera.cs
samJa ae2750836d - Updated Human prefab
- Updated scene Integration
- Updated VampireSquadPrefab
- Updated scene Squad
2015-08-21 15:03:26 -04:00

23 lines
598 B
C#

using UnityEngine;
using System.Collections;
public class UICamera : MonoBehaviour
{
public Camera TargetCamera;
void Awake()
{
//TargetCamera = GetComponent<>()
//TODO find a way to target the player 1 camera and player 2 camera
// example if my parent is player 1 then I target at camera1 else, target at camera2
}
// Update is called once per frame
void Update ()
{
transform.LookAt(
transform.position + TargetCamera.transform.rotation * Vector3.back,
TargetCamera.transform.rotation * Vector3.up
);
}
}