Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Chapter 2: Rotate a object about its axis using force in unity 4 /5

    • 0
    • 2
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 985
    Comment on it

    In unity physics plays a very important role .So to make the object rotate real and affected by force. We have to set the physics of unity 4 engine manually.If you are using unity 5 then things goes someway different.

    Unity 4 Users:

    To achieve the affect of rotating the object we need to set maxAngularVelocity of the objects with rigid body to 80 or above which is 7 by default.By Doing it all objects in a project , with rigid bodies gets maximum angular velocity to 80. Following are the steps to set max angular velocity in the project.

    Rigidbody.maxAngularVelocity

    The Angular velocity of rigidbody is maintained by maxAngularVelocity in order to avoid numerical unstability with fast moving objects. As it may prevent from fast rotations, we can also override the angular velocity of individual rigid body. maxAngularVelocity is (0 to infinity) and default is 7.

    Following are the steps to set maxAngularVelocity:


    1.Go to the Menu Bar and select Edit. alt text


    2.Go to the Project Settings and select Physics option.

    alt text


    3.On the Inspector tab set Max Angular Velcoity to 80 or above which is 7 by default.

    alt text


    After doing this save the changes.Now you are good to go by applying torque to the rigid body.

     rigidbody .AddTorque(Vector 3.up , ForceMode.Force); 

    These changes are only for users using unity with version 4. Users using unity version 5 please refer to the below mention link for Chapter 3:

    Chapter 3: Rotate a object about its axis using force in unity 4 /5

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: