In this example we will be covering how to make the earth spin on its axis that has 15 degrees angle to it and then rotate around the sun in an elliptical path.
The common problem occurs in the example when the animator rotates the earth 15 degrees on the X axis and then change reference coordinate system to local and then rotate the earth around its local Z axis 360 degrees and loop it. We will assume that the earth was created as a sphere in the top view port so that it's axis is aligned to world space and the default rotation controller is being used which is Euler XYZ.
We have seen the problems that Euler rotation can cause in the explanation of how they work. Rotating the earth along its local will cause the earth to wobble and not do what we want. The solution is this, create the earth from a sphere and align it to the world rotation. Create a dummy object and align its position and rotation to the earth. We well refer to these tow objects now as earth and dummy earth. Link the earth to the dummy earth. Rotate the earth 15 degrees on the X-axis so that the earth has the tilt that we want. Turn on animate and move the time slider to frame 100. Select the earth and change the reference coordinate system to parent. Because the earth is limited to dummy earth all of its transforms will be driven from it. Rotate the earth 360 degrees and the parent Z-axis and then scrub the time slider between frames 0 to 100. We don't have any problems of a wobbling earth because it is aligned to its parent object. What we have done is break down the separate rotations on to different objects and then linked them in an order that allowed this to work.
Another solution to the same problem is to change the order that the rotation axis are calculated in. To try this, reset the scene, create the earth in the top view from a sphere so that it is aligned to the world rotation axis. The default axis order for a Euler rotation is XYZ. You can also look at this as X is linked to Y, Y is linked to Z. Open the motion panel and change to the rotation tab, there is a drop down menu that has all the possible rotation orders available. Change it from XYZ to ZYX. The order is now linked in the opposite order. Rotate the earth 15 degrees on the X-axis so that it has the tilt that we are looking for. Turn on animate and move the time slider to frame 100. Change the reference coordinate system to local and animate the earth rotating 360 degrees around the Z-axis. Scrub the time slider back and forth from frame 0 to 100. You can see we don't get wobble in the rotation as we did the fist time we tried this. The reason for this is the same as the second test where we linked the earth to the dummy earth. The axis are now linked Z to Y and Y to X. When we first rotate the X-axis 15 degrees the other two axis rotate with it, this means the local Z axis is aligned the way that we want. The third solution to this problem is to use a TCB controller. This will avoid the gimble problem and will as you would expect. |