topical media & game development

talk show tell print

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



  
  // objectRotater: Rotates the object to which it is attached.
  // Useful for collectable items, etc.
  
  function Update () 
  {
          transform.Rotate (0, 45 * Time.deltaTime, 0);
  }
  
  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.