admin 发表于 2023-9-27 23:58:53

FPS游戏 世界坐标 与 屏幕坐标转换 代码实现



郁金香灬外挂技术
       
        https://www.yjxsoft.com/
       
        本教程视频1920*1080分辩率下观看最佳
        VS2017+win10 64位 环境
        郁金香老师 QQ -> 150330575 >>phone 139 9636 2600
        欢迎大家参加 郁金香灬技术 游戏安全与外挂的研究学习。
       
        兴趣是我们最好的老师
        成长需要过程与循序渐进        
        兴趣+坚持+时间+优秀的教程会帮助你快速成功
   


学习目标:
方框透视功能测试
   
   
       
static void   WorldToScreen(IN FVector3* worldpos3, OUT FVector3* screenpos2, bool bPlayerViewportRelative); //内置转换 bPlayerViewportRelative这个参数可以没有
static bool   WorldToScreenEx(IN FVector3 WorldLocation, OUT FVector3* Screenlocation);//自写转换
static bool   WorldToScreenRect(IN FVector3 WorldLocation,OUT FVector4& Rect);//自写转换




void TGame::WorldToScreen(IN FVector3* worldpos3, OUT FVector3* screenpos2, bool bPlayerViewportRelative)
{


        printf("内置 TGame::WorldToScreen line=%d \r\n", __LINE__);

        type_ProjectWorldLocationToScreen pcall_worldtoScreen = (type_ProjectWorldLocationToScreen)GetPByPdbName("APlayerController::ProjectWorldLocationToScreen");
        //获取 PlayerController
        UINT_PTR vrcx_PlayerController = TGame::GetPlayerController();

        //printf("pcall_worldtoScreen=%p,GetPlayerController()=%zX \r\n", pcall_worldtoScreen, vrcx_PlayerController);
        //LogFileW("c:\\log\\遍历怪物数组draw.txt", L"pcall_worldtoScreen=%zX,GetAPlayerController()=%zX \r\n", pcall_worldtoScreen, vrcx_PlayerController);
        if (pcall_worldtoScreen && vrcx_PlayerController)
        {
               
                //需要主线程调用
                //pcall_worldtoScreen(
                //        vrcx_PlayerController, // PlayerController指针
                //        worldpos3,// IN 待转换的世界坐标
                //        screenpos2,// OUT 返回转换后的屏幕坐标
                //        bPlayerViewportRelative);//=false);

                // 主线程 调用 call APlayerController::ProjectWorldLocationToScreen
                mainCall((UINT_PTR)pcall_worldtoScreen,
                        (UINT_PTR)vrcx_PlayerController,
                        (UINT_PTR)worldpos3,
                        (UINT_PTR)screenpos2,
                        (UINT_PTR)bPlayerViewportRelative);
        }
        else
        {

                //MessageBoxA(0, __FILE__, "世界坐标转屏幕坐标 错误", MB_OK);
                printf("错误 pcall_worldtoScreen=%p,GetAPlayerController()=%zX \r\n", pcall_worldtoScreen, vrcx_PlayerController);
        }
}



boolTGame::WorldToScreenEx(IN FVector3 WorldLocation, OUT FVector3* Screenlocation)
{
        //获取相机旋转坐标
        FVector3 Rotation = GetCameraRotation();

        D3DMATRIX tempMatrix = Game_Matrix(Rotation);

        FVector3 vAxisX, vAxisY, vAxisZ;

        vAxisX = FVector3(tempMatrix.m, tempMatrix.m, tempMatrix.m);
        vAxisY = FVector3(tempMatrix.m, tempMatrix.m, tempMatrix.m);
        vAxisZ = FVector3(tempMatrix.m, tempMatrix.m, tempMatrix.m);

        //世界矩阵-相机矩阵
        FVector3 vDelta = WorldLocation - GetCameraLocation();

        FVector3 vTransformed = FVector3(vDelta.Dot(vAxisY), vDelta.Dot(vAxisZ), vDelta.Dot(vAxisX));

        float FovAngle = GetFOVAngle();

        //if ( fabs(vTransformed.z) < 1.0f)return 0;

       

        //Screenlocation.x = g_Game->窗口客户端中心X + vTransformed.x * (g_Game->窗口客户端中心X / tanf(FovAngle * (float)PI / 360.f)) / vTransformed.z;
        //Screenlocation.y = 窗口客户端中心Y() - vTransformed.y * (g_Game->窗口客户端中心X / tanf(FovAngle * (float)PI / 360.f)) / vTransformed.z;
        int 窗口客户端中心X = TGame::窗口客户端中心X();
        int 窗口客户端中心Y = TGame::窗口客户端中心Y();
        Screenlocation->x = 窗口客户端中心X + vTransformed.x * (窗口客户端中心X / tanf(FovAngle * (float)PI / 360.f)) / vTransformed.z;
        Screenlocation->y = 窗口客户端中心Y - vTransformed.y * (窗口客户端中心X / tanf(FovAngle * (float)PI / 360.f)) / vTransformed.z;

        Screenlocation->z = 0.0f;
        return 1;
}



bool TGame::WorldToScreenRect(IN FVector3 WorldLocation, OUT FVector4& Rect)
{
        float View{}, Top{}, Lift{}, BoxY{}, BoxH{};
        //FMatrix
        float tempMatrix{};
        //
        // MessageBoxA(0, "WorldToScreenRect", "TEST", 0);
        //MessageBeep(1);
        RM(Get_ViewProjectionMatrix(), tempMatrix, sizeof(tempMatrix));

        View = tempMatrix * WorldLocation.x +
                   tempMatrix * WorldLocation.y +
                   tempMatrix * WorldLocation.z +tempMatrix;

        //这里?
        //printf("View=%0.3f,line=%d \r\n", View, __LINE__);

        // if (View < 1.0f)        return false; //距离?


        View = 1 / View;
        Top = 窗口客户端中心X() + (
                tempMatrix * WorldLocation.x +
                tempMatrix * WorldLocation.y +
                tempMatrix * WorldLocation.z +
                tempMatrix ) * View * 窗口客户端中心X();

        Lift = 窗口客户端中心Y() - (
                tempMatrix * WorldLocation.x +
                tempMatrix * WorldLocation.y +
                tempMatrix * WorldLocation.z +
                tempMatrix ) * View * 窗口客户端中心Y();

        BoxY = 窗口客户端中心Y() - (tempMatrix * WorldLocation.x +       
                                        tempMatrix * WorldLocation.y +               
                                        tempMatrix * (WorldLocation.z + 75.0f) +        tempMatrix) * View * 窗口客户端中心Y();

        Rect.h = Lift - BoxY;
        Rect.w = Rect.h * (float)0.6015625;
        Rect.x = Top - Rect.w / 1.4f;
        Rect.y = BoxY;
        Rect.w *= 1.5f;
        Rect.h *= 2.3f;
        return true;
}



//typedef VOID (CALLBACK* TIMERPROC)(HWND, UINT, UINT_PTR, DWORD);
static const char* logFileName = "c:\\log\\遍历怪物转换坐标.txt";
void   遍历对象绘制方框()
{
       
        static BOOL 执行次数 = 0;
       
        UINT_PTR GWorld = TGame::GetGWorld();
        if (GWorld == NULL)
        {
                printf("Error TGame::GetGWorld()==NULL 执行次数=%d line=%d\r\n", 执行次数,__LINE__);
                return;
        }

        UINT32 minSize =TGame::GetAActorArraySize();
        UINT32 maxSize =TGame::GetAActorArraySizeMax();
       
        if (maxSize == NULL)
        {
                printf("Error maxSize==NULL 执行次数=%d line=%d\r\n", 执行次数, __LINE__);
                return;
        }

       

        UINT_PTR AActor数组 = TGame::GetAActorArray();
        LogFileW(logFileName, L" 执行次数=%05X 遍历怪物数组 AActor=%zX 对象数量=%08Xline=%d\r\n", 执行次数,AActor数组, maxSize, __LINE__);

        if (执行次数 >= 20) return;

        //不是主线程
        //if (TGame::IsMainThread())
        //{
        //        //printf("是主线程 line=%d\r\n",__LINE__);
        //}
        //else
        //{
        //        //printf("Error 不是主线程 pause\r\n");
        //
        //        return;
        //}

       
        LogFileW(logFileName, L" 遍历怪物数组 AActor=%zX 对象数量=%08Xline=%d\r\n", AActor数组, maxSize, __LINE__);        
       
       

        for (UINT32 index = 0; index < maxSize; index++)
        {
                AActor* 对象 = TGame::GetAActor(index);
                if (!对象) continue; //跳过空对象

                wchar_t* 名字 = TActor::GetAActorNameW(对象);

                FString name0;
                FString name158;
                FString name250;
                //对象+250]+18] FName CollisionCylinder有生命 有坐标 可移动的对象
                FName::GetFNameByObj((UINT_PTR)对象, name0);
                //FName::GetFNameByObj(RP((UINT_PTR)对象 + 0x158), name158); //不能区分
                FName::GetFNameByObj(RP((UINT_PTR)对象 + 0x250), name250);

                if (RP((UINT_PTR)名字))
                {
                        //正常就不处理
                }
                else
                {
                        //错误就写为NULL
                        名字 = NULL;
                }

                if (wcscmp(name250.utf16string, L"CollisionCylinder"))
                {
                        //不相等
                        continue;//下一次循环
                }


                {


                        FVector3 pos;
                        FVector3 pos2;
                        TActor::GetAActorPos(对象, pos);
                        float 当前血量 = TActor::GetHpCur(对象);
                        float 血量上限 = TActor::GetHpMax(对象);
                        FVector3 screenpos1= FVector3(0,0,0); // 屏幕1
                        FVector3 screenpos2{0,0,0};// 屏幕2
                       
                        FVector4 Rect={0};

                        {
                                //世界坐标转屏幕坐标
                                //TGame::WorldToScreen(IN(float*) & pos, OUT screenpos, false);
                                //TGame::WorldToScreen(IN(float*) & pos, OUT screenposTwo, true);

                                mainCall((UINT_PTR)TGame::WorldToScreen, (UINT64) & pos, (UINT64)&screenpos1,true);
                               
                                TGame::WorldToScreenEx(IN pos, OUT& screenpos2);

                                TGame::WorldToScreenRect(IN pos, OUT Rect);
                       
                       //
                                //要先判断是在屏幕内
                                //if (TGame::在屏幕内(screenpos, screenpos))
                                {
                                        //Draw::DrawRectIm(screenpos.x, screenpos.y, 11, 11, &Draw::白色);
                                }
                               
                        }

                        //LogFileW(logFileName, L" 对象[%08X]=%p FName<%s,%s,%s>名字=%s hp<%f/%f> 坐标<%0.3f,%0.3f,%0.3f> \
   //                内置屏幕1<%0.3f,%0.3f>自写屏幕2<%0.3f,%0.3f>\
   //                矩形<%0.3f,%0.3f,%0.3f,%0.3f>line=%d\r\n",
                        //        index, 对象,
                        //        name0.utf16string,
                        //        name158.utf16string,
                        //        name250.utf16string,
                        //        名字,
                        //        当前血量,
                        //        血量上限,
                        //        pos.x, pos.y, pos.z,
                        //        screenpos1.x, screenpos1.y,
                        //        screenpos2.x, screenpos2.y,
                        //        Rect.x, Rect.y, Rect.w, Rect.h,
                        //        __LINE__);


                        LogFileW(logFileName, L"编号=%05X 对象=%p名字=% 12s hp<%0.3f/%0.3f> 坐标<%0.3f,%0.3f,%0.3f> \
内置屏幕1<%0.3f,%0.3f>自写屏幕2<%0.3f,%0.3f>\
矩形<%0.3f,%0.3f,%0.3f,%0.3f>line=%d\r\n",
                                index, 对象,
       
                                名字,
                                当前血量,
                                血量上限,
                                pos.x, pos.y, pos.z,
                                screenpos1.x, screenpos1.y,
                                screenpos2.x, screenpos2.y,
                                Rect.x, Rect.y, Rect.w, Rect.h,
                                __LINE__);



                }


        }

        执行次数++;
        return;

}



执行次数=00001 遍历怪物数组 AActor=16898D33330 对象数量=00000512line=41
遍历怪物数组 AActor=16898D33330 对象数量=00000512line=58
编号=0024C 对象=0000016915BB4920名字=      原始角色 hp<100.000/100.000> 坐标<0.016,1.072,19.582>   内置屏幕1<261.586,292.013>自写屏幕2<358.336,400.018>矩形<358.224,399.755,0.237,0.603>line=158
编号=003F0 对象=0000016915BB9240名字=      原始角色 hp<0.000/210.000> 坐标<-103163.883,224085.109,-14181.195>   内置屏幕1<483.025,325.005>自写屏幕2<661.678,445.213>矩形<659.992,441.289,3.540,9.024>line=158
编号=0043E 对象=000001681D35DB60名字=      原始角色 hp<210.000/210.000> 坐标<-113926.953,234912.844,-14341.507>   内置屏幕1<584.018,485.440>自写屏幕2<799.998,664.997>矩形<699.324,430.627,211.472,539.024>line=158
编号=0043F 对象=000001681957D520名字=          鱼鸟 hp<50.000/50.000> 坐标<-94367.156,252292.266,-13928.741>   内置屏幕1<2975.253,296.215>自写屏幕2<4075.693,405.773>矩形<4071.546,396.130,8.702,22.180>line=158
编号=00440 对象=000001681D35B6D0名字=         腔棘鱼 hp<62.201/62.201> 坐标<-94352.188,252539.250,-14928.311>   内置屏幕1<3046.521,391.351>自写屏幕2<4173.307,536.097>矩形<4169.084,526.248,8.888,22.654>line=158
编号=00441 对象=000001681D359240名字=         腔棘鱼 hp<18.945/18.945> 坐标<-92248.586,251031.641,-20275.414>   内置屏幕1<2310.975,732.381>自写屏幕2<3165.718,1003.262>矩形<3162.750,996.349,6.238,15.899>line=158
编号=00442 对象=000001681D356DB0名字=         腔棘鱼 hp<41.549/41.549> 坐标<-95164.406,256034.859,-17165.805>   内置屏幕1<5387.727,823.519>自写屏幕2<7380.448,1128.108>矩形<7372.895,1110.529,15.863,40.432>line=158
编号=00443 对象=000001681D354920名字=         腔棘鱼 hp<24.663/24.663> 坐标<-105510.656,246605.906,-15557.289>   内置屏幕1<21964.709,2234.970>自写屏幕2<30088.344,3061.577>矩形<30023.123,2909.126,137.586,350.696>line=158
编号=00444 对象=000001681D352490名字=         腔棘鱼 hp<38.433/38.433> 坐标<-102730.383,248676.750,-15161.837>   内置屏幕1<7607.782,681.305>自写屏幕2<10421.573,933.293>矩形<10404.102,892.528,36.786,93.764>line=158
编号=00445 对象=000001681D350000名字=         腔棘鱼 hp<13.653/13.653> 坐标<-105904.938,248697.656,-15085.521>   内置屏幕1<0.000,0.000>自写屏幕2<-10404.883,-123.217>矩形<-10382.148,-70.325,-47.727,-121.652>line=158
编号=00446 对象=000001681D5BDB60名字=         腔棘鱼 hp<13.993/13.993> 坐标<-111006.461,254208.266,-15638.823>   内置屏幕1<0.000,0.000>自写屏幕2<-846.402,321.114>矩形<-843.363,328.190,-6.385,-16.275>line=158
编号=00447 对象=000001681D5BB6D0名字=         腔棘鱼 hp<20.739/20.739> 坐标<-98624.211,248278.859,-14655.722>   内置屏幕1<2864.176,372.736>自写屏幕2<3923.530,510.597>矩形<3918.430,498.731,10.707,27.292>line=158
编号=00448 对象=000001681D5B9240名字=          蝠鲼 hp<336.000/336.000> 坐标<-112570.984,253017.875,-14975.537>   内置屏幕1<0.000,0.000>自写屏幕2<-573.599,388.021>矩形<-570.760,394.635,-5.968,-15.212>line=158
编号=00449 对象=000001681D5B6DB0名字=          鱼龙 hp<288.750/288.750> 坐标<-96266.852,249326.953,-16486.326>   内置屏幕1<2594.350,531.166>自写屏幕2<3553.902,727.624>矩形<3549.863,718.218,8.488,21.634>line=158
编号=0044A 对象=000001681D5B4920名字=         腔棘鱼 hp<26.121/26.121> 坐标<-101428.586,251943.766,-15726.040>   内置屏幕1<19490.125,1629.417>自写屏幕2<26698.455,2232.054>矩形<26659.285,2140.113,82.983,211.518>line=158
编号=0044B 对象=000001681D5B2490名字=         腔棘鱼 hp<17.516/17.516> 坐标<-103124.469,255230.453,-15771.631>   内置屏幕1<0.000,0.000>自写屏幕2<-6149.982,-6.319>矩形<-6140.160,16.514,-20.603,-52.514>line=158
编号=0044C 对象=000001681D5B0000名字=         腔棘鱼 hp<14.430/14.430> 坐标<-108051.406,245821.906,-15297.705>   内置屏幕1<0.000,0.000>自写屏幕2<-7195.593,-216.234>矩形<-7174.640,-167.485,-43.988,-112.121>line=158
编号=0044D 对象=000001680AD5DB60名字=         腔棘鱼 hp<12.050/12.050> 坐标<-107757.234,244277.906,-15567.690>   内置屏幕1<0.000,0.000>自写屏幕2<-88483.086,-9864.891>矩形<-88211.297,-9265.843,-538.966,-1373.781>line=158
编号=0044E 对象=000001680AD5B6D0名字=         腔棘鱼 hp<69.667/76.417> 坐标<-95486.547,240201.109,-14748.861>   内置屏幕1<1295.201,351.151>自写屏幕2<1774.248,481.028>矩形<1772.149,476.141,4.410,11.241>line=158
编号=0044F 对象=000001680AD59240名字=         腔棘鱼 hp<33.067/33.067> 坐标<-96000.156,242620.813,-16138.168>   内置屏幕1<1512.390,432.630>自写屏幕2<2071.768,592.644>矩形<2069.303,586.909,5.175,13.190>line=158
编号=00450 对象=000001680AD56DB0名字=      淡水碳龟 hp<840.000/840.000> 坐标<-103274.750,238854.953,-14751.678>   内置屏幕1<1401.400,370.322>自写屏幕2<1919.727,507.290>矩形<1915.871,498.319,8.095,20.633>line=158
编号=00451 对象=000001680AD54920名字=         腔棘鱼 hp<25.292/25.292> 坐标<-111032.063,241886.406,-15055.254>   内置屏幕1<0.000,0.000>自写屏幕2<-3415.770,2.197>矩形<-3397.351,45.114,-38.727,-98.712>line=158
编号=00452 对象=000001680AD52490名字=      淡水碳龟 hp<700.000/700.000> 坐标<-97517.086,232735.297,-14769.164>   内置屏幕1<884.574,347.931>自写屏幕2<1211.744,476.618>矩形<1210.017,472.597,3.629,9.249>line=158
编号=00453 对象=000001680AD50000名字=         腔棘鱼 hp<58.093/58.093> 坐标<-98435.391,243290.719,-14671.205>   内置屏幕1<1723.361,357.281>自写屏幕2<2360.768,489.426>矩形<2357.580,482.006,6.696,17.067>line=158
编号=00454 对象=000001680ADDDB60名字=         腔棘鱼 hp<13.972/13.972> 坐标<-112479.344,254966.563,-15027.750>   内置屏幕1<0.000,0.000>自写屏幕2<-561.361,390.314>矩形<-558.815,396.243,-5.350,-13.636>line=158
编号=00455 对象=000001680ADDB6D0名字=         腔棘鱼 hp<27.217/27.217> 坐标<-114522.555,255996.500,-15039.194>   内置屏幕1<0.000,0.000>自写屏幕2<-290.836,400.483>矩形<-288.756,405.328,-4.372,-11.144>line=158
编号=00456 对象=000001680ADD9240名字=         腔棘鱼 hp<27.432/27.432> 坐标<-123358.414,252891.609,-15389.132>   内置屏幕1<0.000,0.000>自写屏幕2<384.366,399.863>矩形<385.814,403.232,-3.039,-7.747>line=158
编号=00457 对象=000001680ADD6DB0名字=         腔棘鱼 hp<29.412/29.412> 坐标<-123303.664,255099.406,-18226.066>   内置屏幕1<0.000,0.000>自写屏幕2<334.045,283.910>矩形<335.399,287.061,-2.843,-7.247>line=158
编号=00458 对象=000001680ADD4920名字=         腔棘鱼 hp<29.302/29.302> 坐标<-124992.961,255726.422,-15697.837>   内置屏幕1<0.000,0.000>自写屏幕2<390.854,395.145>矩形<392.095,398.032,-2.605,-6.640>line=158
编号=00459 对象=000001680ADD2490名字=         腔棘鱼 hp<40.713/40.713> 坐标<-125094.258,251956.563,-15252.915>   内置屏幕1<0.000,0.000>自写屏幕2<479.439,408.052>矩形<480.819,411.261,-2.896,-7.382>line=158
编号=0045A 对象=000001680ADD0000名字=         腔棘鱼 hp<21.890/21.890> 坐标<-121129.906,252439.156,-14753.344>   内置屏幕1<0.000,0.000>自写屏幕2<282.847,425.559>矩形<284.485,429.373,-3.441,-8.772>line=158
编号=0045B 对象=00000168F9A64920名字=         腔棘鱼 hp<29.003/29.003> 坐标<-111288.781,248860.703,-14868.048>   内置屏幕1<0.000,0.000>自写屏幕2<-1036.344,365.372>矩形<-1031.758,376.034,-9.620,-24.521>line=158
编号=0045C 对象=000001680ADFDB60名字=         腔棘鱼 hp<13.668/13.668> 坐标<-111671.031,248148.391,-14943.347>   内置屏幕1<0.000,0.000>自写屏幕2<-952.875,352.975>矩形<-948.216,363.825,-9.791,-24.956>line=158
编号=0045D 对象=000001680ADFB6D0名字=         腔棘鱼 hp<43.974/43.974> 坐标<-115880.563,249025.469,-16632.938>   内置屏幕1<0.000,0.000>自写屏幕2<-78.622,250.720>矩形<-75.901,257.053,-5.714,-14.564>line=158
编号=0045E 对象=000001680ADF9240名字=         腔棘鱼 hp<39.667/41.794> 坐标<-113973.234,247704.109,-16224.883>   内置屏幕1<0.000,0.000>自写屏幕2<-365.746,231.721>矩形<-362.143,240.108,-7.567,-19.288>line=158
编号=0045F 对象=000001680ADF6DB0名字=         腔棘鱼 hp<18.349/18.349> 坐标<-122662.156,248546.109,-14662.547>   内置屏幕1<0.000,0.000>自写屏幕2<468.636,428.842>矩形<470.384,432.913,-3.673,-9.362>line=158
编号=00460 对象=000001680ADF4920名字=         腔棘鱼 hp<16.792/16.792> 坐标<-120527.602,248130.703,-16129.277>   内置屏幕1<0.000,0.000>自写屏幕2<361.236,333.570>矩形<363.257,338.274,-4.244,-10.818>line=158
编号=00461 对象=000001680ADF2490名字=         腔棘鱼 hp<13.159/13.159> 坐标<-120227.984,244108.844,-15263.638>   内置屏幕1<0.000,0.000>自写屏幕2<495.287,372.231>矩形<497.816,378.117,-5.311,-13.538>line=158
编号=00462 对象=000001680ADF0000名字=         腔棘鱼 hp<29.144/29.144> 坐标<-120336.266,247869.234,-15690.872>   内置屏幕1<0.000,0.000>自写屏幕2<357.057,358.870>矩形<359.128,363.689,-4.349,-11.085>line=158
编号=00463 对象=000001680B35DB60名字=         腔棘鱼 hp<14.636/14.636> 坐标<-121267.727,244694.016,-15219.274>   内置屏幕1<0.000,0.000>自写屏幕2<535.583,383.461>矩形<537.848,388.733,-4.757,-12.126>line=158
编号=00464 对象=000001680B35B6D0名字=         三叶虫 hp<224.000/224.000> 坐标<-129126.398,245402.547,-14606.665>   内置屏幕1<0.000,0.000>自写屏幕2<808.316,435.329>矩形<809.732,438.624,-2.973,-7.578>line=158
编号=00465 对象=000001680B359240名字=         三叶虫 hp<160.000/160.000> 坐标<-127224.648,244492.547,-14810.327>   内置屏幕1<0.000,0.000>自写屏幕2<791.903,423.339>矩形<793.501,427.059,-3.356,-8.554>line=158
编号=00466 对象=000001680B356DB0名字=         双脊龙 hp<156.000/156.000> 坐标<-129925.953,242603.953,-14343.737>   内置屏幕1<0.000,0.000>自写屏幕2<936.204,446.706>矩形<937.699,450.184,-3.138,-8.000>line=158
编号=00467 对象=000001680B354920名字=         三叶虫 hp<256.000/256.000> 坐标<-133315.797,251911.219,-14733.168>   内置屏幕1<0.000,0.000>自写屏幕2<714.455,435.489>矩形<715.471,437.853,-2.133,-5.436>line=158
编号=0046D 对象=000001680B166DB0名字=         腔棘鱼 hp<21.144/21.144> 坐标<-117487.063,238982.688,-14757.602>   内置屏幕1<0.000,0.000>自写屏幕2<596.179,372.402>矩形<601.336,384.405,-10.830,-27.605>line=158
编号=0046E 对象=000001680B164920名字=         腔棘鱼 hp<26.282/26.282> 坐标<-116902.766,236410.844,-14665.309>   内置屏幕1<0.000,0.000>自写屏幕2<929.291,346.656>矩形<937.772,366.398,-17.814,-45.407>line=158
编号=0046F 对象=000001680B162490名字=         腔棘鱼 hp<9.356/9.356> 坐标<-116329.070,243126.328,-16160.382>   内置屏幕1<0.000,0.000>自写屏幕2<138.370,215.551>矩形<142.372,224.866,-8.405,-21.425>line=158
编号=00470 对象=000001680B160000名字=         三叶虫 hp<320.000/320.000> 坐标<-124858.391,235475.578,-14782.954>   内置屏幕1<0.000,0.000>自写屏幕2<1319.147,404.650>矩形<1322.010,411.316,-6.015,-15.331>line=158
编号=00471 对象=000001680B1ADB60名字=         腔棘鱼 hp<27.858/27.858> 坐标<-124306.367,241365.234,-14626.214>   内置屏幕1<0.000,0.000>自写屏幕2<847.561,426.324>矩形<849.719,431.347,-4.533,-11.553>line=158
编号=00472 对象=000001680B1AB6D0名字=         腔棘鱼 hp<9.784/9.784> 坐标<-121612.406,235908.656,-14803.396>   内置屏幕1<0.000,0.000>自写屏幕2<1238.446,385.657>矩形<1242.353,394.750,-8.205,-20.915>line=158
编号=00473 对象=000001680B1A9240名字=         三叶虫 hp<320.000/320.000> 坐标<-120725.172,240846.438,-14877.380>   内置屏幕1<0.000,0.000>自写屏幕2<714.659,394.522>矩形<717.616,401.403,-6.209,-15.827>line=158
编号=00474 对象=000001680B1A6DB0名字=         腔棘鱼 hp<16.544/16.544> 坐标<-122819.086,237171.469,-14650.506>   内置屏幕1<0.000,0.000>自写屏幕2<1115.665,413.639>矩形<1118.766,420.857,-6.513,-16.602>line=158
编号=00475 对象=000001680B1A4920名字=         腔棘鱼 hp<12.655/12.655> 坐标<-124122.344,236088.203,-14812.284>   内置屏幕1<0.000,0.000>自写屏幕2<1249.343,400.683>矩形<1252.289,407.538,-6.185,-15.766>line=158
编号=00476 对象=000001680B1A2490名字=         腔棘鱼 hp<10.427/10.427> 坐标<-120827.508,235229.781,-14780.724>   内置屏幕1<0.000,0.000>自写屏幕2<1334.509,376.977>矩形<1339.142,387.757,-9.728,-24.795>line=158
编号=00477 对象=000001680B1A0000名字=         腔棘鱼 hp<22.184/22.184> 坐标<-116575.203,234237.328,-14708.597>   内置屏幕1<0.000,0.000>自写屏幕2<1894.892,220.384>矩形<1911.864,259.892,-35.650,-90.869>line=158
编号=00478 对象=000001680B20DB60名字=         腔棘鱼 hp<13.696/13.696> 坐标<-116527.219,234369.750,-14717.499>   内置屏幕1<0.000,0.000>自写屏幕2<1798.905,221.285>矩形<1815.473,259.851,-34.799,-88.701>line=158
编号=00479 对象=000001680B20B6D0名字=         腔棘鱼 hp<8.339/8.339> 坐标<-119241.953,234900.047,-14646.924>   内置屏幕1<0.000,0.000>自写屏幕2<1402.782,376.621>矩形<1409.100,391.328,-13.270,-33.825>line=158
编号=0047A 对象=000001680B209240名字=         腔棘鱼 hp<16.829/16.829> 坐标<-121695.469,234016.609,-14828.669>   内置屏幕1<0.000,0.000>自写屏幕2<1547.581,370.228>矩形<1552.205,380.990,-9.710,-24.751>line=158
编号=0047B 对象=000001680B206DB0名字=         腔棘鱼 hp<22.562/22.562> 坐标<-120807.359,234096.156,-14636.537>   内置屏幕1<0.000,0.000>自写屏幕2<1557.126,390.546>矩形<1562.388,402.802,-11.059,-28.188>line=158
编号=0047C 对象=000001680B204920名字=         腔棘鱼 hp<23.685/23.685> 坐标<-126424.891,240299.266,-14634.313>   内置屏幕1<0.000,0.000>自写屏幕2<971.638,427.852>矩形<973.611,432.446,-4.145,-10.565>line=158
编号=0047D 对象=000001680B202490名字=      无齿翼龙 hp<210.000/210.000> 坐标<-92248.227,220834.453,-8565.301>   内置屏幕1<606.197,200.725>自写屏幕2<830.406,274.966>矩形<829.418,272.666,2.075,5.290>line=158
编号=0047E 对象=000001680B25DB60名字=         渡渡鸟 hp<48.000/48.000> 坐标<-94308.094,224476.828,-14228.860>   内置屏幕1<656.808,327.352>自写屏幕2<899.737,448.427>矩形<898.581,445.737,2.427,6.187>line=158
编号=0047F 对象=000001681957AA80名字=          鱼鸟 hp<50.000/50.000> 坐标<-100341.289,226493.969,-13350.823>   内置屏幕1<618.273,295.288>自写屏幕2<846.948,404.504>矩形<845.358,400.803,3.340,8.513>line=158
编号=00480 对象=0000016819577FE0名字=          鱼鸟 hp<50.000/50.000> 坐标<-108013.469,225084.625,-13639.714>   内置屏幕1<332.949,294.123>自写屏幕2<456.095,402.908>矩形<453.697,397.329,5.035,12.833>line=158
编号=00481 对象=0000016819575540名字=         三角龙 hp<375.000/375.000> 坐标<-100225.766,217575.250,-13737.442>   内置屏幕1<413.253,313.924>自写屏幕2<566.101,430.033>矩形<564.898,427.235,2.525,6.435>line=158
编号=00482 对象=0000016819572AA0名字=          鱼鸟 hp<50.000/50.000> 坐标<-107557.258,220184.594,-13820.965>   内置屏幕1<233.873,309.589>自写屏幕2<320.373,424.095>矩形<318.526,419.794,3.881,9.892>line=158
编号=00483 对象=000001680B25B6D0名字=         三叶虫 hp<160.000/160.000> 坐标<-109406.344,226668.813,-14639.778>   内置屏幕1<306.766,353.135>自写屏幕2<420.226,483.746>矩形<417.265,476.851,6.222,15.858>line=158
编号=00484 对象=000001680B259240名字=         腔棘鱼 hp<16.901/16.901> 坐标<-107058.789,225600.625,-14504.452>   内置屏幕1<394.251,340.545>自写屏幕2<540.070,466.500>矩形<537.776,461.160,4.819,12.282>line=158
编号=00485 对象=000001680B256DB0名字=         渡渡鸟 hp<56.000/56.000> 坐标<-109257.172,229860.766,-14332.769>   内置屏幕1<463.868,333.522>自写屏幕2<635.434,456.880>矩形<631.744,448.289,7.752,19.760>line=158
编号=00486 对象=000001680B254920名字=         腔棘鱼 hp<28.119/28.119> 坐标<-108274.828,220577.219,-14735.874>   内置屏幕1<208.091,349.089>自写屏幕2<285.055,478.203>矩形<283.093,473.637,4.121,10.504>line=158
编号=00487 对象=000001680B252490名字=         腔棘鱼 hp<20.921/20.921> 坐标<-106955.414,221485.141,-14663.634>   内置屏幕1<287.403,345.173>自写屏幕2<393.702,472.840>矩形<391.820,468.458,3.954,10.078>line=158
编号=00488 对象=000001680B250000名字=          蝠鲼 hp<336.000/336.000> 坐标<-108232.820,223082.313,-14735.388>   内置屏幕1<266.048,351.539>自写屏幕2<364.449,481.560>矩形<362.251,476.444,4.616,11.766>line=158
编号=0048A 对象=000001680B2EB6D0名字=         腔棘鱼 hp<36.246/36.246> 坐标<-105326.109,216763.500,-14488.361>   内置屏幕1<259.074,335.597>自写屏幕2<354.896,459.722>矩形<353.443,456.341,3.051,7.777>line=158
编号=0048B 对象=000001680B2E9240名字=         腔棘鱼 hp<19.298/19.298> 坐标<-109826.305,224367.406,-14823.425>   内置屏幕1<206.921,361.707>自写屏幕2<283.453,495.489>矩形<280.791,489.294,5.590,14.248>line=158
编号=0048C 对象=000001680B2E6DB0名字=         腔棘鱼 hp<21.747/21.747> 坐标<-111368.484,224841.969,-14791.071>   内置屏幕1<100.070,365.637>自写屏幕2<137.083,500.872>矩形<133.920,493.512,6.642,16.929>line=158
编号=0048D 对象=000001680B2E4920名字=         渡渡鸟 hp<48.000/48.000> 坐标<-92107.375,214343.281,-12795.374>   内置屏幕1<501.465,299.686>自写屏幕2<686.939,410.529>矩形<686.078,408.525,1.808,4.609>line=158
编号=0048E 对象=0000016819570000名字=         三角龙 hp<450.000/450.000> 坐标<-100260.617,215354.547,-14171.988>   内置屏幕1<375.460,325.909>自写屏幕2<514.329,446.450>矩形<513.193,443.806,2.385,6.080>line=158
编号=0048F 对象=000001680B2E2490名字=         腔棘鱼 hp<10.771/10.771> 坐标<-106843.969,217351.875,-14709.813>   内置屏幕1<213.091,344.290>自写屏幕2<291.906,471.631>矩形<290.311,467.919,3.349,8.536>line=158
编号=00490 对象=000001680B2E0000名字=         腔棘鱼 hp<57.667/60.564> 坐标<-105206.109,215347.750,-14696.669>   内置屏幕1<240.949,341.769>自写屏幕2<330.067,468.176>矩形<328.686,464.961,2.901,7.396>line=158
编号=00491 对象=000001680B33DB60名字=         腔棘鱼 hp<42.712/42.712> 坐标<-104438.969,214462.203,-14628.264>   内置屏幕1<252.354,338.989>自写屏幕2<345.691,464.368>矩形<344.389,461.337,2.735,6.971>line=158
编号=00492 对象=000001680B33B6D0名字=         腔棘鱼 hp<69.667/70.106> 坐标<-105726.563,216469.500,-14667.440>   内置屏幕1<240.518,341.607>自写屏幕2<329.476,467.955>矩形<328.011,464.543,3.078,7.846>line=158
编号=00493 对象=000001680B339240名字=         腔棘鱼 hp<40.274/40.274> 坐标<-105939.766,215111.547,-14565.939>   内置屏幕1<212.447,337.911>自写屏幕2<291.022,462.892>矩形<289.606,459.595,2.975,7.584>line=158
编号=00494 对象=000001680B336DB0名字=         腔棘鱼 hp<37.050/37.050> 坐标<-105139.102,215684.453,-14584.795>   内置屏幕1<248.263,338.341>自写屏幕2<340.085,463.481>矩形<338.694,460.241,2.923,7.451>line=158
编号=00495 对象=000001680B334920名字=         渡渡鸟 hp<48.000/48.000> 坐标<-119901.656,226667.453,-14213.031>   内置屏幕1<-46455.574,52.798>自写屏幕2<-63634.637,72.343>矩形<-63841.730,-402.337,428.309,1091.723>line=158
编号=00496 对象=000001680B332490名字=         腔棘鱼 hp<20.366/20.366> 坐标<-116496.539,229194.406,-14663.796>   内置屏幕1<-1890.503,485.755>自写屏幕2<-2589.737,665.418>矩形<-2607.481,624.107,37.277,95.016>line=158
编号=00497 对象=000001680B330000名字=         腔棘鱼 hp<10.088/10.088> 坐标<-112063.906,220751.563,-14644.694>   内置屏幕1<-32.727,350.353>自写屏幕2<-44.832,479.935>矩形<-47.424,473.900,5.446,13.882>line=158
编号=00498 对象=000001681149DB60名字=         渡渡鸟 hp<40.000/40.000> 坐标<-118901.289,227249.453,-14332.891>   内置屏幕1<-8179.247,386.270>自写屏幕2<-11204.476,529.136>矩形<-11246.823,430.518,88.988,226.823>line=158
编号=00499 对象=000001681149B6D0名字=         腔棘鱼 hp<13.738/13.738> 坐标<-111117.766,225236.063,-14806.498>   内置屏幕1<132.261,366.847>自写屏幕2<181.179,502.530>矩形<178.008,495.149,6.660,16.976>line=158
编号=0049A 对象=0000016811499240名字=         腔棘鱼 hp<14.071/14.071> 坐标<-115457.219,226552.891,-14626.627>   内置屏幕1<-593.920,382.547>自写屏幕2<-813.586,524.037>矩形<-820.331,508.347,14.157,36.086>line=158
编号=0049B 对象=0000016811496DB0名字=         腔棘鱼 hp<31.070/31.070> 坐标<-113631.938,226572.953,-14741.793>   内置屏幕1<-147.614,380.146>自写屏幕2<-202.212,520.749>矩形<-207.072,509.437,10.207,26.017>line=158
编号=0049C 对象=0000016811494920名字=         腔棘鱼 hp<10.567/10.567> 坐标<-114474.438,227025.844,-14608.469>   内置屏幕1<-322.630,373.528>自写屏幕2<-441.960,511.682>矩形<-447.879,497.904,12.433,31.690>line=158
编号=0049D 对象=0000016811492490名字=         三叶虫 hp<224.000/224.000> 坐标<-115098.547,225735.266,-14378.395>   内置屏幕1<-456.423,341.951>自写屏幕2<-625.235,468.426>矩形<-630.855,455.350,11.799,30.074>line=158
编号=0049E 对象=0000016811490000名字=         腔棘鱼 hp<19.405/19.405> 坐标<-114618.938,224725.000,-14563.397>   内置屏幕1<-331.856,359.017>自写屏幕2<-454.596,491.804>矩形<-459.232,481.018,9.733,24.807>line=158
编号=0049F 对象=000001681440DB60名字=         腔棘鱼 hp<28.688/28.688> 坐标<-112194.188,224902.781,-14818.821>   内置屏幕1<20.464,371.357>自写屏幕2<28.033,508.707>矩形<24.569,500.645,7.275,18.544>line=158
编号=004A0 对象=000001681440B6D0名字=         三叶虫 hp<160.000/160.000> 坐标<-114116.305,226728.734,-14799.656>   内置屏幕1<-239.753,392.364>自写屏幕2<-328.428,537.485>矩形<-333.780,525.033,11.236,28.639>line=158
编号=004A1 对象=0000016814409240名字=         腔棘鱼 hp<11.662/11.662> 坐标<-116018.500,229170.781,-14650.519>   内置屏幕1<-1271.122,447.340>自写屏幕2<-1741.268,612.794>矩形<-1755.149,580.477,29.161,74.328>line=158
编号=004A2 对象=0000016814406DB0名字=         腔棘鱼 hp<17.986/17.986> 坐标<-112848.828,223396.750,-14742.518>   内置屏幕1<-76.171,363.789>自写屏幕2<-104.345,498.341>矩形<-107.659,490.624,6.963,17.749>line=158
编号=004A3 对象=0000016804E34920名字=         渡渡鸟 hp<48.000/48.000> 坐标<-120411.773,229915.703,-14386.299>   内置屏幕1<0.000,0.000>自写屏幕2<3693.118,407.983>矩形<3705.040,435.725,-25.033,-63.808>line=158
编号=004A4 对象=0000016814404920名字=         三叶虫 hp<192.000/192.000> 坐标<-114962.469,224659.016,-14428.401>   内置屏幕1<-401.287,345.591>自写屏幕2<-549.709,473.412>矩形<-554.555,462.134,10.176,25.939>line=158
编号=004A5 对象=0000016804F3DB60名字=         渡渡鸟 hp<64.000/64.000> 坐标<-124725.031,217412.219,-12038.209>   内置屏幕1<-7303.275,-530.168>自写屏幕2<-10004.546,-726.263>矩形<-10021.451,-765.738,35.625,90.805>line=158
编号=004A6 对象=0000016804F36DB0名字=         窃蛋龙 hp<140.000/140.000> 坐标<-126456.734,212956.766,-11711.661>   内置屏幕1<-4914.263,-231.083>自写屏幕2<-6731.846,-316.549>矩形<-6741.513,-339.000,20.256,51.631>line=158



页: [1]
查看完整版本: FPS游戏 世界坐标 与 屏幕坐标转换 代码实现