Solved 3D Box

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Xenshi

Newbie
Full Member
Jan 24, 2014
6
142
0
sorry if this stupid to make a new thread about, but im trying to create a 3d box for css, using tastyhorrors css base...


so far i have...

C++:
struct sEngine
{
	bool WorldtoScreen(D3DXVECTOR3* In, D3DXVECTOR3* Out)
	{
		float fIn[3] = { In->x, In->y, In->x };
		float fOut[3] = { 0, 0, 0 };
		if (WorldToScreen(fIn, fOut))
		{
			Out->x = fOut[0];
			Out->y = fOut[1];
			Out->z = fOut[2];
			return true;
		}
		return false;
	}
};
sEngine* cEngine = new sEngine();

void DrawBoundingBox(D3DXVECTOR3 Min, D3DXVECTOR3 Max, DWORD color, int r, int g, int b, int a)
{
	D3DXVECTOR3 v1, v2, v3, v4, v5, v6, v7, v8;

	VectorCopy(Min, v1);
	VectorCopy(Max, v8);
	VectorCopy(Min, v2);
	VectorCopy(Min, v3);
	VectorCopy(Min, v4);

	v2[0] = Max[0];
	v3[1] = Max[1];
	v4[0] = Max[0];
	v4[1] = Max[1];

	VectorCopy(v1, v5);
	v5[2] = Max[2];
	VectorCopy(v2, v6);
	v6[2] = Max[2];
	VectorCopy(v3, v7);
	v7[2] = Max[2];

	if (!cEngine->WorldtoScreen(&v1, &v1))
		return;

	if (!cEngine->WorldtoScreen(&v2, &v2))
		return;

	if (!cEngine->WorldtoScreen(&v3, &v3))
		return;

	if (!cEngine->WorldtoScreen(&v4, &v4))
		return;

	if (!cEngine->WorldtoScreen(&v5, &v5))
		return;

	if (!cEngine->WorldtoScreen(&v6, &v6))
		return;

	if (!cEngine->WorldtoScreen(&v7, &v7))
		return;

	if (!cEngine->WorldtoScreen(&v8, &v8))
		return;

	DrawLine(v1[0], v1[1], v2[0], v2[1], r,g,b,a);
	DrawLine(v1[0], v1[1], v3[0], v3[1], r, g, b, a);
	DrawLine(v1[0], v1[1], v5[0], v5[1], r, g, b, a);
	DrawLine(v2[0], v2[1], v4[0], v4[1], r, g, b, a);
	DrawLine(v2[0], v2[1], v6[0], v6[1], r, g, b, a);
	DrawLine(v3[0], v3[1], v4[0], v4[1], r, g, b, a);
	DrawLine(v3[0], v3[1], v7[0], v7[1], r, g, b, a);
	DrawLine(v4[0], v4[1], v8[0], v8[1], r, g, b, a);
	DrawLine(v5[0], v5[1], v6[0], v6[1], r, g, b, a);
	DrawLine(v5[0], v5[1], v7[0], v7[1], r, g, b, a);
	DrawLine(v7[0], v7[1], v8[0], v8[1], r, g, b, a);
	DrawLine(v6[0], v6[1], v8[0], v8[1], 0,0,0,255);
}

void BoundingBox(D3DXVECTOR3 vTargetOrigin, DWORD color, int r,int g,int b,int a)
{
	D3DXVECTOR3 Min, Max;

	Min[0] = vTargetOrigin[0] - 0.50f;
	Min[1] = vTargetOrigin[1] - 0.10f; // foot plane
	Min[2] = vTargetOrigin[2] - 0.50f;

	Max[0] = vTargetOrigin[0] + 0.50f;
	Max[1] = vTargetOrigin[1] + 1.80f; // head plane
	Max[2] = vTargetOrigin[2] + 0.50f;

	DrawBoundingBox(Min, Max, color,r,g,b,a);
}

and i do for vtargetorigin

C++:
D3DXVECTOR3 = pEnt;
pEnt = EnemyXY;
just wont draw..:(

i can draw a shitty 3d box..but its still 2d...im trying to make one that stays at a position so when you move, the box looks actuly 3d.., please help...correct my programming mistakes :D,

cheers, Xenshi
 

Nether

The Angel Of Verdun
Meme Tier VIP
Dank Tier Donator
Dec 11, 2013
293
3,738
16
almost 100 views, 2 weeks..no answer....really...
WorldToScreen Function looks wrong, but If you've had it working before i suggest taking out all those return statements, in fact all of those if statements with return, see if it works without them, but if you haven't got that w2s function working before i suggest you look on this website for a w2s function :)
 
Last edited:

Xenshi

Newbie
Full Member
Jan 24, 2014
6
142
0
WorldToScreen Function looks wrong, but If you've had it working before i suggest taking out all those return statements, in fact all of those if statements with return, see if it works without them, but if you haven't got that w2s function working before i suggest you look on this website for a w2s function :)
thats a different w2s then the one i use for esp...thats the one i use for 3d boxes.....i use the exact same one on iss
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods