Primitive Ellipse BoundingSphere problem?

Jun 28, 2011 at 9:45 AM

Forgive me If I have this incorrect as I'm fairly new to xna/silverlight 3d and the babylon engine, so there is a chance I have this wrong! I am learning this from re-engineering the samples.

Whenever I create a primitive ellipse (of base ellipsebase) the boundingsphere is always created at the origin point and cannot be moved when the object mesh is moved from the origin.

To move the mesh I perform a  BasicEffect.World = Matrix.CreateTranslation(Vector3)

However the BoundingSphere remains centred at 0,0,0 and I can see no way of moving it as the BoundingSphere is read-only. In my mind, the effect should have moved the BoundingSphere as well.

So is it possible to move the BoundingSphere away from the origin , or is this a bug? 

Many thanks,

Simon

Coordinator
Jun 29, 2011 at 8:53 PM

Hi Simon,

the BoundingSphere remains in the object's world. You have to transform it by the same matrix.

By the way, you can download the source if you want to automaticaly apply this transformation.

 

David.