Showing results for 
Search instead for 
Did you mean: 
Honored Contributor III

Unity Tip For Spherical Rotation Joints

Hi everyone,

Here's a new quick tip that I found for smoothing out jerky points in a camera-driven Unity sphere object that is used as a rotational joint.  If you find that the rotation is smooth in some parts of the object's rotation cycle but then suddenly jumps at a certain point, check the 'Scale' values in your sphere's settings in the Inspector panel of Unity.

The values should be identical for all three directional planes (X, Y and Z).  However, when you change an object that is linked to your rotational joint, Unity often automatically changes the rotation joint's Scale values too so that they are no longer identical.  The effect is similar to driving a car with a deflated wheel.

The cure for this problem is simple.  Just pick one of the Scale values and use copy and paste to change the joint's X-Y-Z scale values so they all have that number.  My own golden rule for getting the size right is to look for the two numbers out of three that are closest to each other.  So if X = 0.412, Y = 0.433 and Z = 1.2, I will assume that the largest value is the wrong one and use the nearest whole number to the closest pair instead (e.g '0.4')

Be vigilant and periodically check your camera-driven joints to see if they have become distorted - it is really easy to miss the problem when you are focusing on everything else in your project.

Important note:  ALWAYS detach from a joint anything that is connected to it before you edit its Scale values, or everything below it in the object hierarchy will have its Scale values distorted too!  

A quick way to do this is to right-click on the object below the joint in the Hierarchy panel of Unity (so that you select everything below the joint that is childed to it) and then select Copy to take a copy of this group of objects and then Delete to cut them off from the joint.  Once you have edited the joint's Scale values to correct them, right click on the joint in the Hierarchy and select Paste to paste back into the project the group of objects you deleted, then drag and drop the top-most parent object of that paste to re-child the group of objects back onto the joint.

0 Kudos
0 Replies