- Home /
 
freezeRotation not available after upgrading to v5
Hi,
in my MouseOrbit.cs I have the following code that is obsolete:
 // Make the rigid body not change rotation
 if (rigidbody) {
  rigidbody.freezeRotation = true;
 }
 
               Unfortunately "freezeRotation" is not available any more. What is the alternative?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by julmot · Mar 12, 2015 at 09:33 AM
Solved the problem with
         // Make the rigid body not change rotation
         var rigidb = GetComponent<Rigidbody>();
         if (rigidb) {
             rigidb.freezeRotation = true;
         }
 
              Your answer