Yuechen Bai
Game Scripting Portfolio
Watch Dogs - Hack Puzzle
This project recreates the iconic hack puzzle from Watch Dogs. These puzzles typically involve an objective that is out of sight. Players switch between cameras, unlock access, and reach the objective.
Scripting - Tracing
Sphere tracing is used to detect player interactions. All interactable objects, including CCTV cameras, wire boxes, and the final objective, can only be activated when they are hit by a trace. The trace channel filters which objects are ignored and which can be hit. The starting point of the trace is adjusted slightly to the right to make aiming more comfortable.


The key is to separate the trace logic between the player camera and the CCTV camera. The player uses a third-person over-the-shoulder perspective, while the CCTV uses a first-person view.