My ESP is causing random lines to occur all over the screen? Why?
They just continue after finishing making the box, like this (otherwise its perfect, resizes to fit player, if crouching, etc...):
Code:
----------
- -
- -
- -
-----------------------
-
-
-
-
This happens on all different corners, randomly, and sometimes it comes from the corner of my screen...
Code:
D3DXVECTOR3 BoundingBoxSideOffset = D3DXVECTOR3(65, 0, 0);
D3DXVECTOR3 BoxOffsetY = D3DXVECTOR3(0, 50, 0);
__forceinline void Render2DBoxBounding(LPDIRECT3DDEVICE9 D3DDevice, CFPlayer* Player, D3DCOLOR ESPColor) {
D3DXVECTOR3 HeadPosition = (GetBonePosition((Player -> Object), 6) + BoxOffsetY);
D3DXVECTOR3 RealFootPosition = GetBonePosition((Player -> Object), 28);
D3DXVECTOR3 FootMidpointPosition = (D3DXVECTOR3(HeadPosition.x, RealFootPosition.y, HeadPosition.z) - BoxOffsetY);
D3DXVECTOR3 BoundingBoxLeftTopPoint = WorldToScreenPoint(D3DDevice, (HeadPosition - BoundingBoxSideOffset));
D3DXVECTOR3 BoundingBoxLeftBottomPoint = WorldToScreenPoint(D3DDevice, (FootMidpointPosition - BoundingBoxSideOffset));
D3DXVECTOR3 BoundingBoxRightTopPoint = WorldToScreenPoint(D3DDevice, (HeadPosition + BoundingBoxSideOffset));
D3DXVECTOR3 BoundingBoxRightBottomPoint = WorldToScreenPoint(D3DDevice, (FootMidpointPosition + BoundingBoxSideOffset));
if ((BoundingBoxLeftTopPoint && BoundingBoxLeftBottomPoint) && (BoundingBoxRightTopPoint && BoundingBoxRightBottomPoint)) {
DrawD3DLine(D3DDevice, BoundingBoxLeftTopPoint.x, BoundingBoxLeftTopPoint.y, BoundingBoxRightTopPoint.x, BoundingBoxRightTopPoint.y, ESPColor);
DrawD3DLine(D3DDevice, BoundingBoxLeftBottomPoint.x, BoundingBoxLeftBottomPoint.y, BoundingBoxRightBottomPoint.x, BoundingBoxRightBottomPoint.y, ESPColor);
DrawD3DLine(D3DDevice, BoundingBoxLeftTopPoint.x, BoundingBoxLeftTopPoint.y, BoundingBoxLeftBottomPoint.x, BoundingBoxLeftBottomPoint.y, ESPColor);
DrawD3DLine(D3DDevice, BoundingBoxRightTopPoint.x, BoundingBoxRightTopPoint.y, BoundingBoxRightBottomPoint.x, BoundingBoxRightBottomPoint.y, ESPColor);
};
};
This DrawD3DLine worked fine for other ESP's, so did WorldToScreenPoint and GetBonePosition...
This code is 10000000000% the problem.
EDIT: example using both my 2d box, and a public 3d box
https://imgur.com/a/WTwUI6n
https://imgur.com/a/jvUfELD