rotate an object while it follows a path

I am trying to rotate the moons and Planets as they orbit their parent bodies. In a way that does not require the setting up of key frames – jwktrucker

You guys have been very helpful and Thanks to all of you.

On "Cyclic orbit animation" you showed me how to get an object to orbit another so using the follow path method how can I make the object rotate on its own axis as it orbits the other object. This project is to complex to clutter with key frames so if you can

Oh and the orbit speed and rotation speeds of objects will not be related to each other

Object 1 "Sun" stationary
Object 2 "Planet 1" orbits sun at 300 frames rotates in 26 frames
Object 3 "Moon 1" orbits planet 1 at 100 frames rotates in 15 frames

above is Just an example of project requirements The system I am building has 37 objects in it one of witch is an Asteroid Belt

• I am trying to rotate the moons and Planets as they orbit their parent bodies. In a way that does not require the setting up of key frames – jwktrucker Sep 1 '15 at 6:52
• Please explain why you want no keyframes. – atomicbezierslinger Sep 1 '15 at 7:59

One way to do this is with an empty following the orbit. This way you can parent an object to the empty and rotate it independently:

1. Add an empty and make it follow a path (e.g. with the Follow Path constraint). Clicking Animate Patch will automatically add an fcurve modifier which endlessly moves the empty along the path:

To control the orbit speed, set the total number of frames required for an orbit by adjusting the Frames value in Properties > Object data > Path Animation with the curve selected:

2. Parent your object to the empty (⎈ CtrlP):

Now the object's transforms will be relative to the empty. You can rotate the empty to tilt the object's axis of rotation if you like.

3. Make the planet object spin. To do this, insert a keyframe on the Z rotation of the object ( RMB > Insert single keyframe). You'll only need this one keyframe. You could use drivers instead, however that may cause issues if you plan on using a renderfarm such as sheepit.

In the graph editor, add a Generator fcurve modifier. Note that internally blender stores rotations as radians, so to make the planet rotate once every 26 frames, you'll want the X multiplier to be 6.28318531/26 (6.28318531 radians = 360°).

Result:

Everything is because physics, you need to:

1. turn the gravity off if you haven't done yet.
2. Have a force field in the "center" of your solar system highly attractive (in my example -100).
3. An object that need to be your planet with an track constraint that makes it looking always to the force field. (look at the properties in the example image)
4. A force field attached to the planet, this force field needs to be slightly to some side to the planet. (in my example, 1 unit to the left, is on x because the constraint and it's strength is 20).
5. make the animation about 500 frames and in the scene properties tab, rigid body cache group make the end = 500.
6. Press play, eventually your planet is going to rotate around the biggest force field, and because the planet force field is attached to the planet and it's looking always to the "sun" it's starting to rotate around itself, I think the same principle it's applied to the moon.

In theory, our moon is always looking the earth with the same side and it's translation around the earth makes the earth rotates, so this principle is really and application to the moon physics rather than earth physics, but it's a beginning, hope I helped you with this.