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

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Tutorial

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

NeighborSpy
Unity & Secret Neighbor Modder
VIP
Rep: 290
Join Date: May 2023
Posts: 17
Thanks: 76
1y ago · Aug 13, 2025 7:17 PM
#1
Deriving bounding box height and width from head-to-feet distance with dynamic aspect ratio scaling.
NeighborSpy · Secret Neighbor & Unity Netcode
PlayerRole, Keycards, Basement Locks & Stamina inspection
The following users thanked NeighborSpy for this post:
HexRays99
Senior Reverse Engineer
VIP
Rep: 380
Join Date: Apr 2022
Posts: 36
Thanks: 94
1y ago · Aug 13, 2025 8:58 PM
#2
Calculate feet and head screen positions with WorldToScreen, compute delta height = feetY - headY, and set width = height * 0.55f.
HexRays99 · Reverse Engineering & Static Analysis
CPP
// Always check your pointers!
if (!pLocalPlayer) return;
RenderMaster
ImGui UI Designer
VIP
Rep: 310
Join Date: Sep 2023
Posts: 32
Thanks: 82
1y ago · Aug 15, 2025 12:58 AM
#3
Adding an extra 10% vertical padding above the head position accounts for helmets and hats across different character models.
RenderMaster | Clean UI Design & Dear ImGui widgets