# Building a Free-Roaming 3D Camera | DirectX 12 & C++ — Day 6

**URL:** <https://forums.unrealengine.com/t/building-a-free-roaming-3d-camera-directx-12-c-day-6/2875071>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, CPP\
**Created:** [November 30, 2026, 12:15pm UTC](https://forums.unrealengine.com/t/building-a-free-roaming-3d-camera-directx-12-c-day-6/2875071 "2026-11-30T12:15:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinpc\_1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kevinpc_1/32/1215238_2.png) [@kevinpc\_1](https://forums.unrealengine.com/u/kevinpc_1)\
**Post date:** [November 30, 2026, 12:15pm UTC](https://forums.unrealengine.com/t/building-a-free-roaming-3d-camera-directx-12-c-day-6/2875071/1 "2026-11-30T12:15:20Z")

</div>

Today I implemented a free-roaming camera system for my custom rendering engine, allowing me to navigate and inspect a multi-cube 3D scene in real time.

The implementation includes:

- Right-click mouse look with cursor capture.

- Yaw and pitch rotation with pitch clamping.

- Forward and right vector calculations in a left-handed coordinate system.

- View matrix construction using `XMMatrixLookAtLH`.

- Keyboard-based movement: WASD and Q/E for vertical movement.

- Frame-rate-independent movement and Shift sprint (2.5x speed).

- Link video Day 6:[https://youtu.be/-DLPFipIPhw](https://youtu.be/-DLPFipIPhw)

The camera system is built directly into my C++ engine using DirectX 12, Win32 input handling, DirectXMath and Microsoft GDK.

This is part of my ongoing journey building a rendering engine from scratch and exploring low-level graphics and engine architecture.

#DirectX12 #CPlusPlus #GameEngine #GraphicsProgramming #Rendering #GameDevelopment #MicrosoftGDK #EngineDevelopment
