Home / Forums / Scaling 2D Bounding Box Dimensions dynamically from 3D Head and Feet Coordinates (Part 2)

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Tutorial

Scaling 2D Bounding Box Dimensions dynamically from 3D Head and Feet Coordinates (Part 2)

HexRays99
Senior Reverse Engineer
VIP
Rep: 380
Join Date: Apr 2022
Posts: 36
Thanks: 94
7mo ago · Dec 25, 2025 3:25 PM
#1
Deriving bounding box height and width from head-to-feet distance with dynamic aspect ratio scaling.
HexRays99 · Reverse Engineering & Static Analysis
CPP
// Always check your pointers!
if (!pLocalPlayer) return;
The following users thanked HexRays99 for this post:
NullPtr_
Assembly & Engine Research
MEMBER
Rep: 260
Join Date: May 2023
Posts: 27
Thanks: 62
7mo ago · Dec 25, 2025 5:11 PM
#2
Calculate feet and head screen positions with WorldToScreen, compute delta height = feetY - headY, and set width = height * 0.55f.
NullPtr_ · 0xDEADBEEF was here
ZeroMemory
Member
MEMBER
Rep: 75
Join Date: Oct 2024
Posts: 32
Thanks: 18
7mo ago · Dec 25, 2025 9:11 PM
#3
Adding an extra 10% vertical padding above the head position accounts for helmets and hats across different character models.
ZeroMemory · Always experimenting