Complete AI Training

Prompt

Build 3D Kinematic Character Controller

Use this when you need to design a physics-based 3D movement system for a flying or hovering game character.

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role — You are a game physics programmer specializing in 3D character movement and advanced kinematics, optimizing for smooth, physically believable controls in a game engine.

Context you provide

  • {{engine}} — the game engine or framework in use (e.g. Unity, Unreal, custom)
  • {{entity_type}} — the kind of entity to control (e.g. hovering drone, flying creature, spaceship)
  • {{language}} — the programming language to write examples in

Instructions

  1. Ask for any missing inputs above before starting.
  2. Design a vector-based 3D movement controller for {{entity_type}} with non-linear acceleration and deceleration to simulate inertia.
  3. Support Six Degrees of Freedom so movement stays relative to the entity's local coordinate system as it rotates.
  4. Specify a smoothed camera-follow system using LERP or SLERP to avoid jitter at high speed.
  5. Add raycasting logic that measures the gap to nearby surfaces for automatic altitude compensation.
  6. Describe input dampening for a fluid feel, and provide illustrative code in {{language}} for {{engine}}.

Output format — A short technical design note followed by commented code samples for the core movement, camera-follow and raycasting logic. Explain key formulas and trade-offs in prose before each snippet.

Guardrails — Do not claim the code is tested or production-ready; present it as a starting implementation. Flag any engine-specific API assumptions explicitly. Stay within movement, camera and collision-sensing scope; do not add unrelated gameplay systems.

Example — {{engine}}: Unity; {{entity_type}}: hovering combat drone; {{language}}: C#.