Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Battlefield Hacks & Cheats › Battlefield Bad Company 2 (BFBC2) Hacks › 2D Bounding Boxes

2D Bounding Boxes

Posts 1–15 of 43 · Page 1 of 3
xbeatsszzx
xbeatsszzx
2D Bounding Boxes
Here you go

Code:
static Vec4 Vec4Transform( Vec4 In, Mat4 pm )
    {
        Vec4 Out;

        Out.x = pm.m_rows[0].x * In.x + pm.m_rows[1].x * In.y + pm.m_rows[2].x * In.z + pm.m_rows[3].x;
        Out.y = pm.m_rows[0].y * In.x + pm.m_rows[1].y * In.y + pm.m_rows[2].y * In.z + pm.m_rows[3].y;
        Out.z = pm.m_rows[0].z * In.x + pm.m_rows[1].z * In.y + pm.m_rows[2].z * In.z + pm.m_rows[3].z;
        Out.w = pm.m_rows[0].w * In.x + pm.m_rows[1].w * In.y + pm.m_rows[2].w * In.z + pm.m_rows[3].w;

        return Out;
    }

    static Vec4 Vec4Transform( Vec4 In, LinearTransform pm )
    {
        Vec4 Out;

        Out.x = pm.left.x * In.x + pm.up.x * In.y + pm.forward.x * In.z + pm.trans.x;
        Out.y = pm.left.y * In.x + pm.up.y * In.y + pm.forward.y * In.z + pm.trans.y;
        Out.z = pm.left.z * In.x + pm.up.z * In.y + pm.forward.z * In.z + pm.trans.z;
        Out.w = pm.left.w * In.x + pm.up.w * In.y + pm.forward.w * In.z + pm.trans.w;

        return Out;
    }

    static Vec3 Vec3Transform( Vec3 In, Mat4 pm )
    {
        Vec3 Out;

        Out.x = pm.m_rows[0].x * In.x + pm.m_rows[1].x * In.y + pm.m_rows[2].x * In.z + pm.m_rows[3].x;
        Out.y = pm.m_rows[0].y * In.x + pm.m_rows[1].y * In.y + pm.m_rows[2].y * In.z + pm.m_rows[3].y;
        Out.z = pm.m_rows[0].z * In.x + pm.m_rows[1].z * In.y + pm.m_rows[2].z * In.z + pm.m_rows[3].z;

        return Out;
    }

    static Vec3 Vec3Transform( Vec3 In, LinearTransform pm )
    {
        Vec3 Out;

        Out.x = pm.left.x * In.x + pm.up.x * In.y + pm.forward.x * In.z + pm.trans.x;
        Out.y = pm.left.y * In.x + pm.up.y * In.y + pm.forward.y * In.z + pm.trans.y;
        Out.z = pm.left.z * In.x + pm.up.z * In.y + pm.forward.z * In.z + pm.trans.z;

        return Out;
    }  
Code:
dice::AxisAlignedBox GetSoldierBounds( dice::ClientSoldierEntity* pEntity, bool CenterBounds = false ) { dice::AxisAlignedBox AABB; dice::LinearTransform AAWorldTransform; pEntity->computeBoundingBox( &AABB ); pEntity->computeBoundingBoxWorldTransform( &AAWorldTransform ); dice::AxisAlignedBox R; R.min = dice::Vec3Transform( AABB.min, AAWorldTransform ); R.max = dice::Vec3Transform( AABB.max, AAWorldTransform ); if( CenterBounds ) { R.min.x = pEntity->m_cameraLocalSpace.trans.x; R.min.z = pEntity->m_cameraLocalSpace.trans.z; R.max.x = pEntity->m_cameraLocalSpace.trans.x; R.max.z = pEntity->m_cameraLocalSpace.trans.z; } return R; }
Code:
       dice::AxisAlignedBox Bounds = GetSoldierBounds( pEntity, true );

        dice::Vec3 SoldierBounds[2];

        if( 
            dice::Core::WorldToScreen( &Bounds.max, &SoldierBounds[0] ) &&
            dice::Core::WorldToScreen( &Bounds.min, &SoldierBounds[1] ) )
        {
            float w = ( SoldierBounds[1].y - SoldierBounds[0].y ) / 4;

            D3DRender::OutlineRGB( SoldierBounds[0].x - w, SoldierBounds[0].y, w * 2, 
                ( SoldierBounds[1].y - SoldierBounds[0].y ), 1, RenderColor );
        }  
Entity VTable + 0x50 = computeBoundingBoxWorldTransform
Entity VTable + 0x54 = computeBoundingBox



Credits:
s0biet
#1 · 15y ago
MS
msr890
can you please tell me how to use this ?
#2 · 15y ago
Pandemic
Pandemic
Quote Originally Posted by msr890 View Post
can you please tell me how to use this ?
compile it to a dll file and inject it
#3 · 15y ago
MS
msr890
Quote Originally Posted by fierguy View Post


compile it to a dll file and inject it
were can i find the process to compile it ?
#4 · 15y ago
CrazeyHazey
CrazeyHazey
I agree with him id like to know how to compile it what program
#5 · 15y ago
LA
Lawllypawp
You use hacks every day but you don't even know what program you use to compile a dll:|
You use http://www.microsof*****m/express/Windows/
#6 · 15y ago
LP
lpjz50
C++ compiles them.
#7 · 15y ago
CO
Comet
you need to know C++, visual basic etc. Basic coding.
#8 · 15y ago
SQ
squash85
very nice ty, if you dont know how to compile & inject stuff then google it guys however assinat3d why not release it with a tut and already compiled? ne ways good job and thank you. but the code seems incomplete? or is it just me??
#9 · edited 15y ago · 15y ago
SO
SofaKingH4rd
I use visual basic to compile my private hacks.
#10 · 15y ago
AU
austin209
does this work on PB servers? :P New to BFBC2..
#11 · 15y ago
nikolayl
nikolayl
if just someone compile's it to dll and upload it here then you would have less people asking for ''how to compile''
#12 · 15y ago
MI
Miklo
Quote Originally Posted by nikolayl View Post
if just someone compile's it to dll and upload it here then you would have less people asking for ''how to compile''
Then leechers don't have to do anything... (Next people will be asking for an injector.)
#13 · 15y ago
[D
[D]ark
Very Good !
#14 · 15y ago
ST
Steelhawk92
A tut/how to, or a final compiled version would be a heaven send.
#15 · 15y ago
Posts 1–15 of 43 · Page 1 of 3

Post a Reply

Tags for this Thread

None