followwing a path

i am trying to create a very simple solar system model, and i will run it in the game engine… i created four spheres (sun, and three planets)… i would like to animate the planets’ revolution via “follow path” parenting… can somebody help me with this… all i have right now are the spheres and a bezier circle that i want to use as the orbit… please help me with this one… thanks in advance!!!

(this is my .blend file, in case you want to point out where i went wrong)
http://www.savefile.com/files/32121

Unless you want to make the planets dynamic here’s what you should do.

1). Set the center (pink dot) of the planet objects to be in the middle of the solar system
2). In the logic bricks connect an always sensor to a motion actuator using a low Drot value around the global Z-axis

Since the objects will rotate around their centers they’ll look like they’re orbiting

thanks Icoxo… does that answer mean i can’t use paths in game engine? just a question… thanks again…

from what I know you can’t use any type of special objects in the game engine like bezier or nurbs objects

Hi.
I just was in the same need.
I wanted to use the Path of Blender in GameEngine. I haven’t found anything so I created a very simple python script that will bake in a way the animation in a new duplicated object.


#Bake the animation in a way.
 
# f1 is the start frame f2 is the end
# change them to suit your needs
f1 = 0
f2 = 60
import Blender
#The selected Object
ob = Blender.Object.GetSelected()[0]
#The duplicant
Blender.Object.Duplicate()
ob2 = Blender.Object.GetSelected()[0]
ob2.clrParent()
ob2.clearIpo()
 
for i in range(f1 , f2):
  Blender.Set('curframe' , i)
 ob2.setMatrix( ob.getMatrix() )
  ob2.insertIpoKey(0)
 ob2.insertIpoKey(1)

You can see that it was realy simple.
Here is the test file : http://uploader.polorix.net/files/BakeAnim.blend (this still change only the location, the code changed to copy and the rotation)

A better way of doing this is to put a empty (or one for each planet if you want them to orbit at different speeds), and then place the empty in the center of the solar system, and make the planets parent to it with ctrl+p. Then just have the empty (or empties) rotating.
Also, this allows your planets to be spinning, and orbit around the solar system.:slight_smile:

Hi
I have already worked on a solar system that is roughly scaled and everything is based on an earth day so it is also reasonably scientific. You can download it here look for solarsystem link on this page http://www.bentstraight.org/tutorials.html
I used circles for the planets orbits as this is heaps easier and the orbit paths are near enough to circles for this simulation.
I hope this helps. It uses a bit of python and I had to take out the large res planet photos for uploading. Good Luck
Dr S

Hello haramanai

nice script
thank you for sharing
Bye