- Home /
 
               Question by 
               user-7113 (google) · Dec 25, 2010 at 12:40 PM · 
                rigidbodymovingifstatement  
              
 
              if moving statement
Is there an if statement that checks if an Rigidbody is moving? Because my enemy has to play the "run animation" if he is moving.
thanks
               Comment
              
 
               
              Answer by Statement · Dec 25, 2010 at 12:47 PM
if (rigidbody.velocity != Vector3.zero)
{
    // moving
}
There's your statement from Statement.
Your answer
 
 
             Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How do I make a car in unity? 1 Answer
C# Creating a List of If Statements 3 Answers
Can't convert int to bool? 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                