Jump to content

  • Log In with Google      Sign In   
  • Create Account






A Look-At Camera in SlimDX and Direct3D 11

Posted by ericrrichards22, 30 August 2013 · 257 views

C# SlimDX Direct3D 11 Third-person camera

Today, we are going to reprise our Camera class from the Camera Demo. In addition to the FPS-style camera that we have already implemented, we will create a Look-At camera, a camera that remains focused on a point and pans around its target. This camera will be similar to the very basic camera we implemented for our initial examples (see the Colored Cube Demo). While our FPS camera is ideal for first-person type views, the Look-At camera can be used for third-person views, or the “birds-eye” view common in city-builder and strategy games. As part of this process, we will abstract out the common functionality that all cameras will share from our FPS camera into an abstract base camera class.



The inspiration for this example come both from Mr. Luna’s Camera Demo (Chapter 14 of Frank Luna’s Introduction to 3D Game Programming with Direct3D 11.0), and the camera implemented in Chapter 5 of Carl Granberg’s Programming an RTS Game with Direct3D. You can download the full source for this example from my GitHub repository at https://github.com/ericrrichards/dx11.git under the CameraDemo project. To switch between the FPS and Look-At camera, use the F(ps) and L(ook-at) keys on your keyboard.


Posted Image


Read More...





July 2014 »

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930 31   

Latest Visitors

PARTNERS