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—zooming in and out

You want to add zoom in and zoom out capabilities to the camera rotating around the model. However, there is no zoom property.

Using a perspective camera, we can change the values for many parameters to control it like a telephoto lens, as explained next:

  1. Stay in the 3DInvadersXBAP project.
  2. Go to the perspective camera's properties. Check the value for Perspective Field of View (usually 45 degrees by default).
  3. Change it to 150 degrees. You will see more models in the scene, but the spaceship will be shown smaller (further away from the camera), as in the following screenshot:
    Time for action—zooming in and out
  4. Now, change it to 75 degrees. You will ...

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