O'Reilly logo

3D Game Development with Microsoft Silverlight 3 Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action—scaling 3D characters

The UFO is too small. You want to make it appear bigger on the rendered scene. However, you do not want to change the camera's parameters. Unfortunately, the 3D digital artists cannot change the original model because they are attending a conference.

Now, we are going to scale this 3D character changing the values of the world matrix's elements.

  1. Stay in the 3DInvadersSilverlight project.
  2. Open Ufo.cs.
  3. Replace the lines that update the mesh's world matrix with these:
    _mesh.World = Balder.Core.Math.Matrix.CreateRotationX(_angleDegrees.X) * Balder.Core.Math.Matrix.CreateRotationY(_angleDegrees.Y) * Balder.Core.Math.Matrix.CreateRotationZ(_angleDegrees.Z) * Balder.Core.Math.Matrix.CreateScale(new Vector(4f, 4f, 4f)); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required