topical media & game development

talk show tell print

lib-unity-tutorial-platform-start-Assets-Scripts-Misc-FuelCellGlowLookAt.js / js



  
  // fuelCellGlowLookAt: Forces the object to always face the camera.
  // (Used for the 'glowing halo' effect behind the collectable items.)
  
  function Update() 
  {
          transform.LookAt(Camera.main.transform);
  }
  
  function OnBecameVisible()
  {
          enabled = true;        
  }
  
  function OnBecameInvisible()
  {
          enabled = false;        
  }


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.