CollisionShape2D
Define the collision boundary for physics bodies using primitive or custom shapes.
Physics
No shortcutBeginner5 min readQuick Reference
CollisionShape2D
Godot EngineKeyboard Shortcut
N/A
Where to Find
Scene dock — Create New Node > Node2D > Physics
Best Used For
- ▸Define collision boundaries for game objects
- ▸Detect overlaps for pickups, damage zones, and triggers
- ▸Simulate realistic forces and gravity responses
Beginner-Friendly⏱ 15–30 minutes to master
Key Settings
Add as child:Choose shape:Size:Custom polygon:
CollisionShape2D defines the shape for collision detection. It must be a child of a PhysicsBody2D to function.
Where to Find It
Found in Create New Node under Node2D > Physics. Must be child of a physics body.
How to Use
- Add as child: Select a physics body, add CollisionShape2D.
- Choose shape: Pick RectangleShape2D, CircleShape2D, or PolygonShape2D.
- Size: Use handles in viewport to resize, or adjust values in Inspector.
- Custom polygon: For PolygonShape2D, draw points in the viewport.
Pro Tips
- Use simplest shape possible for performance.
- Use CapsuleShape2D for characters for smooth movement over terrain.
- Multiple CollisionShape2D children can create complex collision hulls.