33 lines
487 B
C#
33 lines
487 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
using System.Collections;
|
|
|
|
|
|
|
|
public class Clouds : MonoBehaviour
|
|
|
|
{
|
|
|
|
public Camera cameraToLookAt;
|
|
|
|
private void Start()
|
|
{
|
|
if (cameraToLookAt == null)
|
|
{
|
|
cameraToLookAt = Camera.main;
|
|
}
|
|
}
|
|
|
|
void Update ()
|
|
{
|
|
|
|
Vector3 v = cameraToLookAt.transform.position - transform.position ;
|
|
|
|
v.x = v.z = 0.0f;
|
|
|
|
transform.LookAt (cameraToLookAt.transform.position - v);
|
|
|
|
}
|
|
|
|
} |