- Home /
 
               Question by 
               naderlabbad309 · Jan 26, 2019 at 02:50 PM · 
                c#animationmousecursor  
              
 
              How to start Animation left turn With the cursor
Hello I have a problem I did not get help from any side now and in the forum there was only one problem was solved bad bad so
i have hear left turn and right turn and this script to Rotate player left and right With the cursor moving 
I want to move the cursor (mouse) to the right of (right turn) and to the left (left turn) when i stop the cursor stops both I can not find a solution for this plz help
 
                 
                untitled.png 
                (159.3 kB) 
               
 
                
                 
                p.png 
                (10.6 kB) 
               
 
              
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by naderlabbad309 · Jan 28, 2019 at 07:03 PM
so i fix it need to public float turnspeed = 0.0f;
     turnspeed = Input.GetAxis("Mouse X");
     if (turnspeed > 0)
     {
         anim.SetBool("isleft", true);
         anim.SetBool("isnotleft", false);
         
     }
     else
     {
             
         anim.SetBool("isleft", false);
         anim.SetBool("isnotleft", true);
     }
Your answer
 
 
             Follow this Question
Related Questions
how to show cursor on specific time? 2 Answers
Left Click Script Problems 1 Answer
Use OnMouseEnter/OnMouse Exit with center of screen 1 Answer
error CS8025: Parsing error 1 Answer
Distribute terrain in zones 3 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                