Hi everybody,
I’m trying to make a solar system representation.
Earth is made of an ObjectContainer3D on (0,0,0) that contains a spheric Mesh on (1000,0,0). To make the sphere to rotate around the sound, I simply change the rotationY of the ObjectContainer3D on every frame. So far, it is working pretty good but I have a problem with the HoverController.
The HoverController is looking at the Mesh that is included in the ObjectContainer3D. When there is no rotation, I can look around the planet with no problem and the camera always stay at the same distance of the target. But when I rotate the ObjectContainer3D, the camera doesn’t turn anymore around the target and the distance changes continuously.
Since I have a hard explaining this in english, I made a simple example below with the following parameters:
- container is on (0,0,0)
- container.mesh is on (1000,0,0)
You can rotate the camera around the mesh by pressing the left mouse button and dragging.
On test1.swf, container.rotationY is equal to 0
On test2.swf, container.rotationY is equal to -45
On test1.swf, the rotation around the sphere is correct (the distance stay still)
On test2.swf, the rotation around the sphere is not correct.
What did I do wrong? Does anyone knows what to do?
Thank you a lot for reading this post and maybe to answer to it.
Dr Schizo