惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
Intezer
Google DeepMind News
Google DeepMind News
有赞技术团队
有赞技术团队
博客园 - Franky
Jina AI
Jina AI
博客园_首页
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Engineering at Meta
Engineering at Meta
B
Blog
A
About on SuperTechFans
J
Java Code Geeks
WordPress大学
WordPress大学
GbyAI
GbyAI
N
News | PayPal Newsroom
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
T
The Exploit Database - CXSecurity.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
N
Netflix TechBlog - Medium
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
U
Unit 42
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Know Your Adversary
Know Your Adversary
博客园 - 三生石上(FineUI控件)
AWS News Blog
AWS News Blog
Latest news
Latest news
V
V2EX
Y
Y Combinator Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
美团技术团队
A
Arctic Wolf
S
Secure Thoughts
H
Help Net Security
L
LangChain Blog
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
I
InfoQ
Cyberwarzone
Cyberwarzone
S
SegmentFault 最新的问题
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - sun_dust_shadow

(翻译) 延迟补偿方法的协议设计与优化 Latency Compensating Methods in Client/Server In-game Protocol Design and Optimization (翻译) Dota2 Random Distribution Dota2中的随机分布 (个人思考)游戏技能的实现 (读书笔记)平衡掌控者 (个人思考)实现游戏GAS系统中的Tag (翻译) Efficiency Tips on Switching Spaces and Transformation Matrices in Unity (翻译) V Rising's Animation Layering in Unity (翻译 unity2020.1) Understanding the managed heap (UnityEditor Tool) 语音控制unity editor暂停和播放 (翻译 ue gas) Gameplay Ability 总结 Overwatch Gameplay Architecture and Netcode 守望先锋的游戏架构与网络代码 (翻译 ) Source Multiplayer Networking Source引擎的多人网路系统 (翻译 gafferongames) Networked Physics in Virtual Reality VR中的网络物理 Topdown游戏中Input朝向的转化 (翻译 gafferongames) Client Server Connection 客户端服务器连接 (翻译 gafferongames)Reliable Ordered Messages 可靠有序消息 (翻译 gafferongames) Sending Large Blocks of Data 发送大块数据 (翻译 gafferongames) Packet Fragmentation and Reassembly 数据包分片与重组 游戏中Shotgun(喷子)发射子弹的实现
[瞄准辅助] 实现一种柔和平滑的瞄准辅助
sun_dust_shadow · 2025-08-12 · via 博客园 - sun_dust_shadow

目标

实现一种轻量级的平滑瞄准辅助,不会有强烈的吸附感。

参考:https://www.youtube.com/watch?v=yGci-Lb87zs&list=PLG9sbQS_QV1-6MnaNaN-uO5fUkaTocN58&index=23

思路

x轴是输入,y轴是结果(瞄准线的朝向)

当没有辅助时,x和y是45度映射关系,如下图

Snipaste_2025-08-12_21-49-36

 当立马强制辅助吸附到Target中心时,x和y的关系如下图:

Snipaste_2025-08-12_22-03-00

加一些线性的过渡,如下图:

Snipaste_2025-08-12_21-53-06

添加2种类型过渡: 1.核心的压缩过渡     2.从压缩过渡返回到正常映射的过渡(或者反过来) 如下图

image

1. 使用 Monotone cubic 进行曲线的构造  https://en.wikipedia.org/wiki/Monotone_cubic_interpolation

2.构建两种类型的点去构建曲线

   private enum PointType
        {
            //--核心压缩过渡--
            Start = 0,
            Center = 1,
            End = 2,
            //--返回线性过渡--
            BlackStart = 3,
            BlackEnd = 4
        }

需要处理的细节比较多

比如:

1.多个xRang交叉的问题  (冗余点的剔除 )

2.有些过于靠近的xEnd和 nextXBegin是否可以直接合并 (冗余点的合并)

3.首尾交叉(360->0)的问题  (通过延伸首尾数据去解决,会增加一些点数据,但比较直接去解决问题)

实现

这里有具体的实现  https://github.com/fechen2/AimAssistTest?tab=readme-ov-file  

效果还可以

Snipaste_2025-08-12_22-56-36