If you read my post on Plotting Inclination then you'll recall I was having trouble getting a planet's Y position. One sollution I'm currently trying now is to throw out the formulas and just tilt the pivot of the planet.
I have my planet, its parent is a pivot. Tilting the pivot of course just rotates the sphere. I tied the planet's pivot to another pivot which I called "Cpivot" for centerpivot and placed that at the Solar System Center. When I tilted this pivot to the Inclination angle then suddenly all my planets aligned perfectly on their orbit lines. Problem solved ... until ..
I have labels of the planets. My labels locate themselves to where the planet would be if it didnt have the Cpivot. Here is the relevant code :
camera is obviously my camera entity, b/pivot is my "body" pivot (body refering to planet/moon/sun/asteroid/comet/etc), and b\name is the name of the body.
This codes falls in a For b.body = each body statement so that I can check all my astonomical bodies. Basically all its suppose to do is see if something is "on screen" and then if it is put a label overtop it.
Its like the CameraProject command is working only with the b\pivot LOCAL values and not taking into account that b\pivot has been further tilted by b\Cpivot
I PositionEntity b\pivot just before this query and it places the planet in the right place .. why wouldnt it read the correct pivot values back? The order of "parenthood" is thus :
b\CPivot(Centered at 0,0,0)<---b\pivot(Planet Position)<---b\item(image of planet)
I have my planet, its parent is a pivot. Tilting the pivot of course just rotates the sphere. I tied the planet's pivot to another pivot which I called "Cpivot" for centerpivot and placed that at the Solar System Center. When I tilted this pivot to the Inclination angle then suddenly all my planets aligned perfectly on their orbit lines. Problem solved ... until ..
I have labels of the planets. My labels locate themselves to where the planet would be if it didnt have the Cpivot. Here is the relevant code :
If Labels Then CameraProject(camera,EntityX(b\pivot),EntityY(b\pivot),EntityZ(b\pivot)) If EntityInView (b\pivot,camera) Then Text ProjectedX(),ProjectedY(),Upper(b\name),True,True EndIf EndIf
camera is obviously my camera entity, b/pivot is my "body" pivot (body refering to planet/moon/sun/asteroid/comet/etc), and b\name is the name of the body.
This codes falls in a For b.body = each body statement so that I can check all my astonomical bodies. Basically all its suppose to do is see if something is "on screen" and then if it is put a label overtop it.
Its like the CameraProject command is working only with the b\pivot LOCAL values and not taking into account that b\pivot has been further tilted by b\Cpivot
I PositionEntity b\pivot just before this query and it places the planet in the right place .. why wouldnt it read the correct pivot values back? The order of "parenthood" is thus :
b\CPivot(Centered at 0,0,0)<---b\pivot(Planet Position)<---b\item(image of planet)