Advertisement
Guest User

LookAtCamera script

a guest
Nov 13th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  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 -----
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement