Mesh position

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
mjoubert
Posts: 58
Joined: 02.04.2007
With us: 17 years 7 months

Mesh position

Post #1by mjoubert » 05.04.2007, 10:37

Hi all,

Usually, attitude rotates a spacecraft around its gravity center. But Celestia rotates 3d meshes around their "geometric" center.

To correctly handle that, I have to use :

Code: Select all

"MySpacecraft" "Sol/Earth"
{
   Class "spacecraft"
   Mesh ""
   Radius 0.00205
   ...
}

"MySpacecraft-mesh" "Sol/Earth/MySpacecraft"
{
   Class "spacecraft"
   Mesh "MySpacecraft.3ds"
   Radius 0.00205
   Albedo 0.7
   FixedPosition [-0.00198 -0.000115 0.0]
   OrbitFrame { BodyFixed { Center "Sol/Earth/MySpacecraft" } }
   FixedRotation { }
   BodyFrame { BodyFixed { Center "Sol/Earth/MySpacecraft" } }
   Orientation [240 1 -1 1]
}


Is there a simplest way to do this repositionning? (something like MeshCenter [x y z])

Mathieu (spacebel)

Return to “Development”