SHARE
TWEET

LookAtCamera script

a guest Nov 13th, 2019 112 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using Photon.Pun;
  5.  
  6. // ----- Low Poly FPS Pack Free Version -----
  7. public class LookAtCamera : MonoBehaviourPunCallbacks {
  8.  
  9.     private void Start ()
  10.     {
  11.         //Fix inverted scale issue
  12.         gameObject.transform.localScale =
  13.             new Vector3 (-1, 1, 1);
  14.     }
  15.        
  16.     private void Update ()
  17.     {
  18.         //Object always face camera
  19.         transform.LookAt (Camera.main.transform);
  20.     }
  21. }
  22. // ----- Low Poly FPS Pack Free Version -----
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top