Domo's ESP + worldtoscreen

Posts 13 of 3 · Page 1 of 1
Domo's ESP + worldtoscreen
Helps please! it doesnt reconize it! wtf! it should work fine!

Error 1 error C3861: 'WorldToScreen': identifier not found C:\Users\Rzaauchiha\Desktop\Visual 2010\APBVtable\ApbVtable.cpp 293 1 APBVtable
Error 2 error C3861: 'WorldToScreen': identifier not found C:\Users\Rzaauchiha\Desktop\Visual 2010\APBVtable\ApbVtable.cpp 294 1 APBVtable


Code:
  FVector WorldToScreen (UCanvas* Canvas, FVector WorldLocation)//Helios
{
    FVector MyCameraLocation = PlayerController->PlayerCamera->Location; // Get cam location
    FRotator MyCameraRotation = PlayerController->PlayerCamera->Rotation;// Get cam rotation   

    FVector X,Y,Z,D,Out;
    GetAxes(MyCameraRotation,X,Y,Z);

    //D = WorldLocation - MyCameraLocation;
    Out.X = (Canvas->ClipX/2)+( Dot(D,Y))*((Canvas->ClipX/2)/tan(PlayerController->DefaultFOV*PI/360))/Dot(D,X);
    Out.Y = (Canvas->ClipY/2)+(-Dot(D,Z))*((Canvas->ClipX/2)/tan(PlayerController->DefaultFOV*PI/360))/Dot(D,X);
    Out.Z = 0;
    return Out;
}
on
top = WorldToScreen(Canvas,top); and
bottom = WorldToScreen(Canvas,bottom); it should work fine! wtf!
Code:
inline void DrawBoundingBox (UCanvas* Canvas, APawn* Target)
{
        FVector MyCameraLocation = PlayerController->PlayerCamera->Location; // Get cam location
    FRotator MyCameraRotation = PlayerController->PlayerCamera->Rotation;// Get cam rotation   

    FVector X,Y,Z,D,E,top,bottom;;
    float width, Left, Right, Top, Bot;

    GetAxes(MyCameraRotation,X,Y,Z);

    D.X = Target->Location.X - MyCameraLocation.X;
    D.Y = Target->Location.Y - MyCameraLocation.Y;
    D.Z = Target->Location.Z - MyCameraLocation.Z;

    if(Dot(D,X) <= cos(90 * 3.14159265 / 180))
        return;

    FBoxSphereBounds Player = Target->Mesh->Bounds;

    top = Target->Location;
    top = WorldToScreen(Canvas,top);

    bottom = Player.BoxExtent;
    bottom = WorldToScreen(Canvas,bottom);

    width = ((top.Y - bottom.Y) / 3);

    Left  = top.X + width;
    Right = top.X - width;
    Top   = top.Y;
    Bot   = bottom.Y;

    Canvas->Draw2DLine(Left,  Top, Left,  Bot, Green);
    Canvas->Draw2DLine(Left,  Bot, Right, Bot, Green);
    Canvas->Draw2DLine(Right, Bot, Right, Top, Green);
    Canvas->Draw2DLine(Right, Top, Left,  Top, Green);
}

void DrawPlayerESP( UCanvas* pCanvas )
{
    if (PlayerController == NULL || PlayerController->Pawn == NULL || PlayerController->WorldInfo == NULL )
    return;

    APawn* Target = PlayerController->Pawn->WorldInfo->PawnList;
    while ( Target != NULL )
    {
        if ( Target != NULL && !Target->bDeleteMe && Target->Health >0 && Target != PlayerController->Pawn && !Target->IsA(AVehicle::StaticClass())) 
        {
        DrawBoundingBox (pCanvas, Target);
        }
    
        Target = Target->NextPawn;
    }
}

FRUSTRATION!!!!
Stop copy pasting and learn C++ man >.>
You didn't #include anything whatsoever

This is why you don't just copy and paste.

Solved
Posts 13 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?