ESP boxes vs viewangle

Posts 1–4 of 4 · Page 1 of 1
ESP boxes vs viewangle
I have a problem with the ESP boxes. They appear perfect on the enemy player when I have my crosshair aimed at them. However, the more to the right or left an enemy player is, the bigger he becomes while the boxes stay the same size. What I need to do is resize the boxes accordingly when the enemy player is outside of my crosshair. How do I calculate the scaling that is needed?

http ://oi60. tinypic. com/34i0mt2.jpg (remove spaces)
http ://oi62. tinypic. com/20sdu7m.jpg (remove spaces)
Are you using fFlags?

And how does your w2s look like?
Quote Originally Posted by LittleRoxo View Post
Are you using fFlags?
I'm using fFlags to determine whether the enemy is crouching or standing.

Quote Originally Posted by LittleRoxo View Post
And how does your w2s look like?
Code:
VECTOR3 WorldToScreen(VECTOR3 from, float[] viewMatrix, int width, int height)
        {
            if (viewMatrix.Length != 16)
                return null;

            VECTOR3 to = new VECTOR3();
            float w = 0.0f;

            to.x = viewMatrix[0] * from.x + viewMatrix[1] * from.y + viewMatrix[2] * from.z + viewMatrix[3];
            to.y = viewMatrix[4] * from.x + viewMatrix[5] * from.y + viewMatrix[6] * from.z + viewMatrix[7];
            w = viewMatrix[12] * from.x + viewMatrix[13] * from.y + viewMatrix[14] * from.z + viewMatrix[15];

            if (w < 0.01f)
                return null;

            float invw = 1.0f / w;
            to.x *= invw;
            to.y *= invw;

            float x = width / 2;
            float y = height / 2;

            x += 0.5f * to.x * width + 0.5f;
            y -= 0.5f * to.y * height + 0.5f;

            to.x = x;
            to.y = y;

            return to;
        }
Probably your w2s that makes it to do that, i'm almost using the same as you.
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us