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—applying projections

We want players to understand that they are going to play a 3D game. Hence, we will add a plane projection to the Canvas that contains the video (the MediaElement instance):

  1. Stay in the 3DInvadersSilverlight project,.
  2. Open MainPage.xaml and insert the following lines of code after the line that defines the medIntroduction MediaElement:
    <Canvas.Projection>
    <PlaneProjection RotationX="-40" RotationY="15" RotationZ="-6"
    LocalOffsetX="-70" LocalOffsetY="-105" />
    </Canvas.Projection>
    
  3. Build and run the solution. Click on the button and the video will start its reproduction after the transition effect. However, this time, it will be displayed projected using a perspective transform, as shown in the following screenshot: ...

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