郁金香灬老师 游戏安全  驱动 逆向调试 C/C++编程  脚本 UE4/UE5

找回密码
立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
发新帖
课程大纲和价格
官方联系方式2024在线课大纲QQ咨询

34万

积分

123

好友

132

主题
发表于 2023-9-15 21:53:11 | 查看: 1723| 回复: 0





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

学习目标:
   
       
        下载Epic Games启动程序
        https://www.epicgames.com/site/zh-CN/home
        https://www.unrealengine.com/zh-CN/download
       
       
        可以参考UE4/UE5引擎里的 坐标转换源代码,可以通用大部分游戏
       
        Vector.h //包含了 FVector
       
        屏幕坐标转世界坐标
        FSceneView::DeprojectScreenToWorld(const FVector2D& ScreenPos, const FIntRect& ViewRect, const FMatrix& InvViewMatrix, const FMatrix& InvProjectionMatrix, FVector& out_WorldOrigin, FVector& out_WorldDirection)
       
        世界坐标转屏幕坐标
   通过 FSceneView::ProjectWorldToScreen 函数可以计算出,和上面屏幕转世界坐标一样, ViewMatrix 和ProjectionMatrix已经算出,ViewProjectionMatrix直接两者相乘即可得出。

        /** Transforms a point from world-space to the view's screen-space. */
        FVector4 FSceneView::WorldToScreen(const FVector& WorldPoint) const;

        /** Transforms a point from the view's screen-space to world-space. */
        FVector FSceneView::ScreenToWorld(const FVector4& ScreenPoint) const;
       
       
FVector4 FSceneView::WorldToScreen(const FVector& WorldPoint) const
{
        return ViewMatrices.GetViewProjectionMatrix().TransformFVector4(FVector4(WorldPoint,1));
}

FVector FSceneView::ScreenToWorld(const FVector4& ScreenPoint) const
{
        return ViewMatrices.GetInvViewProjectionMatrix().TransformFVector4(ScreenPoint);
}
       
        //世界坐标转屏幕坐标
bool FSceneView::ProjectWorldToScreen(const FVector& WorldPosition, const FIntRect& ViewRect, const FMatrix& ViewProjectionMatrix, FVector2D& out_ScreenPos)
{
        FPlane Result = ViewProjectionMatrix.TransformFVector4(FVector4(WorldPosition, 1.f));
        if ( Result.W > 0.0f )
        {
                // the result of this will be x and y coords in -1..1 projection space
                const float RHW = 1.0f / Result.W;
                FPlane PosInScreenSpace = FPlane(Result.X * RHW, Result.Y * RHW, Result.Z * RHW, Result.W);

                // Move from projection space to normalized 0..1 UI space
                const float NormalizedX = ( PosInScreenSpace.X / 2.f ) + 0.5f;
                const float NormalizedY = 1.f - ( PosInScreenSpace.Y / 2.f ) - 0.5f;

                FVector2D RayStartViewRectSpace(
                        ( NormalizedX * (float)ViewRect.Width() ),
                        ( NormalizedY * (float)ViewRect.Height() )
                        );

                out_ScreenPos = RayStartViewRectSpace + FVector2D(static_cast<float>(ViewRect.Min.X), static_cast<float>(ViewRect.Min.Y));

                return true;
        }

        return false;
}


游戏安全课程 学员办理咨询联系QQ150330575 手机 139 9636 2600  免费课程 在 www.bilibili.com 搜 郁金香灬老师
您需要登录后才可以回帖 登录 | 立即注册

QQ咨询

QQ|Archiver|手机版|小黑屋|郁金香游戏技术

GMT+8, 2024-4-29 10:20 , Processed in 0.085650 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表