Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Godot physics

Godot 4.7 physics API in 2D and 3D: body and Area types, collision_layer and mask bits, Area signals for hurtboxes, RayCast and space queries.

Free on GitHubGame development

Safety check

  • Not rated by Claude yet. We only sell skills Claude has read and rated 7 out of 10 or higher, so this one is a free link to its author.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: godot-physics
description: >
  Godot 4.7 physics API in 2D and 3D: body and Area types, collision_layer and mask bits, Area
  signals for hurtboxes, RayCast and space queries, and Jolt (3D default since 4.6). Use when
  objects pass through each other, body_entered never fires or a raycast hits itself. Not for
  engine-neutral jitter and tunnelling (`physics-tuning`) or CharacterBody movement
  (`godot-2d-movement`).
---

# Godot Physics (4.x, 2D + 3D)

Pick the body type, wire collision layers and masks, detect overlaps, cast rays, and know
where Jolt differs. Swap the `2D`/`3D` suffix as needed. Targets **Godot 4.7** (see Version
notes). 2D always uses Godot's own 2D engine.

## When to use

- Choosing a body type, setting layers/masks so the right things collide, overlap
  detection (triggers, hurtboxes) with `Area`, forces/impulses on a `RigidBody`, or rays
  for line-of-sight and ground checks.

**When *not* to use:** `move_and_slide` controllers → `godot-2d-movement`; tile collision
setup → `godot-tilemap`; engine-neutral feel (timestep, mass, jitter, CCD strategy) →
`physics-tuning`.

## Core workflow

1. **For 3D, read which engine runs** before debugging behavior. In `project.godot`,
   `[physics]` `3d/physics_engine="Jolt Physics"` means Jolt; no line (`DEFAULT`) means
   GodotPhysics3D. New 4.6+ projects write the Jolt line. The API is the same, but joints,
   ray face indices, kinematic contacts and margins differ (see Gotchas).
2. **Choose the body type:** `StaticBody` never moves; `AnimatableBody` is moved by code or
   animation and pushes others (platforms, doors); `RigidBody` is simulated (move it with
   forces, impulses or `linear_velocity`, never `position`); `CharacterBody` is
   script-driven; `Area` only detects and can override gravity/damping. Every body needs a
   non-empty `CollisionShape`/`CollisionPolygon` child.
3. **Configure layers and masks.** Layers are what a body *is*; masks are what it *scans*.
   A detects B only if B's layer bit is in A's mask. Name the bits in `project.godot` so
   the `.tscn` values are readable:
...

From gamedev-skills's repository, Apache-2.0 licence.

Related skills

  • Checked

    Game Audio Mixing

    Sets up game audio buses, volume sliders, music ducking and adaptive music for Godot, Unity or FMOD.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Game camera tuning

    Builds and tunes follow, orbit and first person game cameras in Godot or Cinemachine so they stop jittering.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Game Enemy AI

    Designs enemy AI with perception, pathfinding and steering so enemies chase fairly and never get stuck.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Game Loop and Timing

    Makes movement, timers and physics behave the same at any frame rate in Unity, Godot, Bevy and web games.

    by makifbaysal 123
    7/101 credit
  • Checked

    Godot Game Testing

    Writes and runs Godot tests with gdUnit4 or GUT, including scene tests and headless runs that report real results.

    by makifbaysal 123
    7/101 credit
  • Checked

    Game Security Review

    Reviews Unity, Godot and Unreal code for cheats that hurt other players, purchase exploits and unsafe save files.

    by makifbaysal 123
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added