Home / Forums / Calculating Oriented Bounding Boxes (OBB) using Entity Rotation Quaternions (Part 4)

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Tutorial

Calculating Oriented Bounding Boxes (OBB) using Entity Rotation Quaternions (Part 4)

OffsetHunter
RTTI & NetVar Dumper
MEMBER
Rep: 175
Join Date: Jul 2024
Posts: 20
Thanks: 44
4y ago · Jan 19, 2022 8:36 PM
#1
How to transform local AABB min/max bounds into Oriented Bounding Boxes using entity rotation quaternions in 3D space.
OffsetHunter · RTTI TypeDescriptors & NetVars
The following users thanked OffsetHunter for this post:
SecurityAudit
AppSec & Code Auditor
MEMBER
Rep: 135
Join Date: Jan 2025
Posts: 28
Thanks: 29
4y ago · Jan 20, 2022 1:25 AM
#2
Quaternions represent 3D rotation without gimbal lock. Multiplying each of the 8 local vertices by the rotation quaternion and adding world origin generates exact 3D corners.
SecurityAudit | Secure C++ Architecture & Boundary Auditing
KeycardMaster
Item ESP & Unity UI Dev
MEMBER
Rep: 215
Join Date: Oct 2023
Posts: 19
Thanks: 54
4y ago · Jan 20, 2022 2:25 AM
#3
Projecting the 8 corners with WorldToScreen and connecting 12 edges creates an authentic 3D box that tilts with slopes and stairs.
KeycardMaster | Keycard & Objective ESP Specialist