Back to Game Development

// Player Mechanics

Player
Mechanics

Building the systems that define how a player interacts with the world. From movement and camera control to health management and death handling — all implemented in Unreal Engine using C++ and Blueprints.

// Core Skills

🎮

Player Movement

Axis-based movement input with controller rotation, forward and right vector calculations for responsive character control.

🎥

Camera System

Spring arm and camera component setup with pawn control rotation for smooth third-person camera behavior.

❤️

Health System

Dynamic health tracking with HUD updates, health percentage clamping, and real-time on-screen feedback.

💀

Death Handling

Death state management including health bar reset, input disabling, and HUD removal on player death.

⌨️

Input Binding

Axis and action input binding in both C++ and Blueprints for movement, rotation, and combat actions.

⚔️

Combat Integration

Attack input binding delegated to weapon component with Blueprint visual scripting for animation control.

// Tools & Technologies

Unreal Engine 5C++BlueprintsUSpringArmComponentUCameraComponentUInputComponentFMath::ClampUKismetSystemLibrary

// Work Showcase

Player Movement & Combat Demo

Unreal Engine 5 • C++ • Blueprints

In Development

A demonstration of the core player mechanics system built in Unreal Engine 5 using C++. The video showcases player movement, shooting, and the health and damage system in action — including real-time HUD updates when the player takes damage.

// Live Demo

Axis-based movement with forward and right vector calculations
Controller rotation driving camera and movement direction
Real-time health bar updates on damage received
Attack input bound to weapon component
Smooth third-person camera with spring arm
Death state disabling input and removing HUD

Health & Death System

C++ • Unreal Engine 5 • HUD Integration

A complete health and death system built in C++. The health component tracks current and max health, updates the HUD in real time using a clamped percentage value, and handles player death by disabling input, resetting the health bar, and removing the HUD from the viewport. The system also includes a health pickup interface and a player lost event broadcaster.

// Health & Death Implementation

Health and Death System C++ Code
FMath::Clamp for safe health percentage calculation
Real-time HUD updates via UpdateHealthBar()
UKismetSystemLibrary::PrintString for debug logging
DisableInput() on death to prevent player control
OnPlayerLost broadcast event for game state handling
CanPickUpHealth interface implementation

Camera System

C++ • USpringArmComponent • UCameraComponent

A third-person camera system built using Unreal Engine's Spring Arm and Camera components. The spring arm is offset and attached to the root component with pawn control rotation enabled, while the camera is attached to the spring arm socket and set to not use pawn control rotation independently — giving smooth, lag-free camera behavior that follows the player naturally.

// Camera Constructor Setup

Player Camera C++ Setup
Spring arm attached to root with offset positioning
bUsePawnControlRotation on spring arm for camera control
Camera attached to spring arm socket name
Camera rotation decoupled from pawn for smooth behavior

Input System

C++ • Blueprints • UInputComponent

The input system was implemented in C++ using Unreal Engine's UInputComponent, binding axis inputs for movement and rotation as well as an action input for attacking. The Blueprint screenshot shows the same input functionality as it would appear using Unreal's built-in visual scripting system — demonstrating an understanding of both approaches and how the same logic translates between code and Blueprints. Movement uses controller rotation yaw to drive directional input so the character always moves relative to where the camera is facing.

// C++ Input Binding

C++ Input Actions

// Blueprint Input Graph

Blueprint Input Actions
BindAxis for TurnRight, LookUp, MoveForward, MoveRight
BindAction for Attack on IE_Pressed event
Controller yaw rotation for camera-relative movement
FRotationMatrix for right vector strafing calculation
Blueprint visual scripting for animation triggers
Weapon component delegation for attack logic

© 2026 Maxwell Kelly. All rights reserved.

Built from scratch with Next.js, TypeScript, Tailwind CSS, and Canvas API — Designed & developed by me