Hi all,

Currently I'm trying to scale the asteroids from the Spacewars starter kit into larger sizes. Being a noob, I'm not sure why the asteroid is appearing "corrupted" for a lack of better words.

Here is a screen:

Notice the asteroids look not correct.

Any help would be greatly appreciated.

Here is the code I use to draw them inside of the draw function:


Matrix[] transformsa = new Matrix[this.asteroidModel.Bones.Count];

//Draw Asteroids
for (int i = 0; i < asteroidCount; i++)
foreach (ModelMesh mesh in asteroidModel.Meshes)

//This is where the mesh orientation is set, as well as our camera and projection
foreach (BasicEffect effect in mesh.Effects)
effect.World =
Matrix.CreateScale(asteroidsIdea.scale) * transformsa[mesh.ParentBone.Index] * Matrix.CreateRotationX(asteroidsIdea.rotation.X)

* Matrix.CreateRotationY(asteroidsIdea.rotation.Y) * Matrix.CreateRotationZ(asteroidsIdea.rotation.Z)

* Matrix.CreateTranslation(asteroidsIdea.position);

effect.View = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up);
effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f),
aspectRatio - warpSpeedRatio, 1.0f, 100000.0f);

//Draw the mesh, will use the effects set above.



Re: XNA Game Studio Express Scaling Asteroid from Space Wars starter kit

The ZMan

Most of the models in SpaceWar have a reflectance map stored in the alpha channel of the texture so they won't work too well with BasicEffect. I don't have time to check the asteroids at the moment but that might be the problem. In SpaceWar there is a custom shader that handles the reflectance and the light from the sun.

Re: XNA Game Studio Express Scaling Asteroid from Space Wars starter kit


Dang. I know nothing about that stuff. Another thing to learn...which is good.

Thank you very much for the tip.