一键导入
cinemachine
Cinemachine camera system — virtual cameras, FreeLook, blending, noise profiles, state-driven cameras, confiner, follow/aim behaviors.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Cinemachine camera system — virtual cameras, FreeLook, blending, noise profiles, state-driven cameras, confiner, follow/aim behaviors.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
DOTween animation library — sequence composition, tween lifecycle, easing, kill strategies. CRITICAL: Always kill tweens in OnDestroy to prevent leaks and errors.
Dialogue tree patterns — ScriptableObject graph, node types (text, choice, condition, event), typewriter effect, localization-ready. Load when implementing NPC conversations.
Generic state machine patterns — IState interface, StateMachine<T>, game state management (menu/gameplay/pause), enemy AI states, hierarchical FSM. Load when implementing state-driven behavior.
2D platformer architecture — tight controls (coyote time, input buffer, variable jump), level design patterns, collectibles, checkpoints, hazards, boss patterns.
Unity physics — non-allocating queries, collision layers, FixedUpdate discipline, continuous collision detection, character controllers, joints.
How the atomic instinct learning system works — observations, distillation, confidence scoring, project vs global scope, and promotion/evolution workflows.
| name | cinemachine |
| description | Cinemachine camera system — virtual cameras, FreeLook, blending, noise profiles, state-driven cameras, confiner, follow/aim behaviors. |
| globs | ["**/*Cinemachine*","**/*Camera*.cs","**/*Cam*.cs"] |
CinemachineBrain component to Main CameraBody (follow):
Transposer — 3D offset follow (configurable damping)Framing Transposer — 2D/screen-space follow (dead zone, soft zone)Orbital Transposer — orbit around target (user input rotates)Tracked Dolly — follow a pathAim (look at):
Composer — keep target in frame with dead/soft zonesGroup Composer — frame a group of targetsHard Look At — no damping, instant lookPOV — player-controlled rotation (FPS)Virtual Camera:
Body: Framing Transposer
- Screen X/Y: 0.5 (center)
- Dead Zone Width: 0.1, Height: 0.1
- Damping: X=1, Y=0.5
Follow: Player Transform
Add Extension: CinemachineConfiner2D
- Bounding Shape: PolygonCollider2D (room bounds)
FreeLook Camera:
Follow: Player Transform
Look At: Player Head/Chest
Top/Middle/Bottom Rig:
- Height, Radius per rig
- Composer aim in each rig
X Axis: Input from mouse/stick (orbiting)
Y Axis: Input from mouse/stick (elevation)
State-Driven Camera:
Animated Target: Player Animator
States:
Idle → VCam_Idle (wide shot)
Run → VCam_Run (further back)
Combat → VCam_Combat (over shoulder)
// Source: generates impulse
[SerializeField] private CinemachineImpulseSource _impulseSource;
public void OnExplosion()
{
_impulseSource.GenerateImpulse();
}
Add CinemachineImpulseListener extension to virtual cameras that should respond.
Add CinemachineBasicMultiChannelPerlin to virtual camera:
6D Shake or Handheld_normal_mild// Switch cameras by priority
_combatCamera.Priority = 20; // Higher = active
_exploreCamera.Priority = 10;
// Change follow target
_virtualCamera.Follow = newTarget;
_virtualCamera.LookAt = newTarget;
CinemachineConfiner2D + PolygonCollider2D (set collider to trigger, non-physics layer)CinemachineConfiner + BoxCollider or MeshCollider volume