build-game-camera-controls
它能做什么
这个技能指导智能体为 3D 游戏构建一个能让玩家和威胁都容易看清的镜头。适合为动作游戏制作等距或跟随镜头的开发者。
适用场景
- ✓游戏镜头需要平滑地跟随玩家的时候。
- ✓墙体或道具遮挡了玩家,镜头需要处理这种情况的时候。
- ✓需要锁定目标、镜头抖动或触屏镜头手势的时候。
技能链接
https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-camera-controls/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请让我动作游戏中的镜头平滑地跟随玩家,并在敌人攻击时让它们保持在视野内。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会分别平滑镜头的位置和注视目标,设置缩放和角度限制,并在基础镜头之上添加临时效果。它会检查拐角、高大的道具和触屏控制。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Build Game Camera Controls
Keep gameplay readable before making the camera cinematic. Define one authoritative target, camera bounds, zoom range, collision/occlusion policy, and reduced-motion behavior.
Implement
- Smooth position and look-at targets independently; never bind the camera directly to jittery render state.
- Preserve player, immediate threat, objective, and interaction cues in frame at the intended distance.
- Clamp orbit, pitch, and zoom; prevent walls or props from hiding the player without making geometry invisible globally.
- Treat lock-on, scripted moments, and shake as temporary modifiers layered over the base camera.
- On touch, separate camera gesture zones from movement/action controls and provide reset framing.
Verify
Test corners, tall props, tunnels, multiple enemies, lock-on switching, pause, reduced motion, portrait, and landscape. Confirm no camera behavior breaks targeting, UI, or performance.
常见问题
镜头会直接锁定在玩家身上吗?
不会。技能会平滑镜头目标,使其不会因渲染状态而抖动。
它如何处理墙体?
它会防止墙体或道具遮挡玩家,同时又不会让几何体在所有地方都隐形。
它支持手机吗?
支持。它会在触屏上将镜头手势区域与移动和动作控制区分开来。
详情
作者的原始描述
Implement or tune Three.js game cameras. Use for isometric framing, follow behavior, orbit/zoom limits, occlusion, lock-on, camera shake, touch camera controls, and camera regression tests.
repo: MengTo/Skills
热度
- GitHub 星标
- 7.2k
- 排名
- #13353
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
3d-cloth-material
7.2k帮你的智能体在 Three.js 中制作逼真的编织织物,包括纱线编织纹理、柔和光泽、自然褶皱、下摆和缝线。
3d-falling-leaves
7.2k帮你的智能体在 3D 场景中添加逼真的飘落树叶,树叶会翻滚、随风飘动,并在镜头移动时循环利用。
3d-four-seasons
7.2k帮你的智能体为 3D 场景添加春夏秋冬四季效果,无需重建场景即可改变植被、光线、天空和积雪。
3d-high-poly-models
7.2k帮你的智能体构建形状平滑、边缘可信的精细 3D 模型,然后制作在网页上运行流畅的轻量版本。