Unreal 4 C++ – Building Escape Game


Building Escape is a first-person escape room prototype built in Unreal 4 with C++ and Blueprints, and my second Unreal project overall. The premise is simple but a solid step up from a console game: a single room where the player must find three objects, carry them one by one to a pressure plate, and once enough cumulative weight is placed on it, the door swings open. Grabbing and releasing objects is handled with two dedicated inputs, making physical interaction with the world the core mechanic. The project was the first real contact with Unreal’s collision system, physics-driven gameplay, and level design within the editor.


🎮 Object Grabbing

  • The grab mechanic lets the player pick up physics-enabled objects and hold them in front of the camera using a dedicated button, and release with another.
  • The implementation relies on Unreal’s physics handle system, which attaches the object to a scene component on the character and moves it with the camera each tick, maintaining collision throughout.
  • The key distinction here is between moving an object’s transform directly versus using a physics constraint — the handle approach preserves physical simulation, which is what makes placing objects on the pressure plate feel correct.

⚖️ Pressure Plate & Weight System

  • The pressure plate uses an overlap trigger to detect which physics objects are resting on it and accumulates their mass each frame.
  • Once the total weight crosses a defined threshold, it fires a delegate that the door actor listens to — the plate doesn’t know about the door, it just broadcasts a state change.
  • This separation was a first hands-on exercise in event-driven design in Unreal, and keeping the two actors decoupled made it easy to iterate on both independently.

🚪 Door Mechanism

  • The door opens by interpolating its rotation over time using FMath::Lerp driven each tick, triggered by the pressure plate’s event.
  • The open and closed angles are exposed as editable properties on the actor via UPROPERTY(EditAnywhere), so the exact swing can be tuned directly from the Details panel without touching code.
  • This was an early lesson in making designer-facing parameters editable in the editor rather than hardcoding them — a pattern that becomes essential as projects grow.

🏗️ Level Design & Collision

  • The room is laid out so the three objects are distributed across the space, requiring the player to explore and make multiple trips to the plate.
  • Collision setup on the static meshes and floor was a practical introduction to Unreal’s collision presets and channel system — getting objects to rest naturally on surfaces and respond correctly to the physics handle required deliberate configuration rather than relying on defaults.

Demo: https://www.youtube.com/watch?v=IYQfp7L9bo8
Teaching Playlist: YouTube Playlist

Leave a comment

Create a website or blog at WordPress.com

Up ↑