- Home /
 
               Question by 
               $$anonymous$$ · Jun 21, 2013 at 11:08 AM · 
                camerabuttonmenucamera movement  
              
 
              Please Help !, camera rotation
i want to rotate camera when i click a button.
 var soundHover : AudioClip;
 var soundEnter : AudioClip;
 
 
 function OnMouseEnter(){
     renderer.material.color = Color.gray;
     animation.Play("MouseOver");
     audio.PlayOneShot(soundHover);
 }
 
 function OnMouseExit(){
     renderer.material.color = Color.white;
     animation.Play("MouseExit");
 }
 
 function OnMouseDown(){
 
 
     //here, if this function active, camera rotate
 
     renderer.material.color = Color.grey;
     audio.PlayOneShot(soundEnter);
 }
 
 @script RequireComponent(AudioSource)
NB : sorry for my bad english, i'am indonesian.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Graham-Dunnett · Jun 21, 2013 at 11:09 AM
If you read the docs:
http://docs.unity3d.com/Documentation/ScriptReference/Transform.Rotate.html
you'll learn how to perform rotation.
Your answer
 
 
             Follow this Question
Related Questions
How do I tell a button to move my camera!? 1 Answer
UI Buttons switch cameras 3 Answers
UI 4.6 menu "Start" button script c# 0 Answers
Camera/can't turn on X 1 Answer
Switch Camera On Button Press? 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                