build_character_scene
Generates a complete Godot 4 .tscn character scene with AnimatedSprite2D and a feet-aligned body collider from a spritesheet and SpriteFrames resource.
Instructions
Write a complete Godot 4 .tscn character scene with AnimatedSprite2D and feet-aligned body collider.
Args:
project_root: Path to the Godot project directory containing project.godot.
image_path: Path or res:// URI to the spritesheet PNG.
sprite_frames_tres: Path or res:// URI to the generated SpriteFrames .tres resource.
output_tscn: Destination .tscn file path or res:// URI.
collider_frames: Frame regions (typically the idle animation row) used to compute the body collider.
root_name: Root node name in the scene (default: "Character").
root_type: Root node Godot class (default: "CharacterBody2D").
default_animation: Default animation name for the AnimatedSprite2D (default: "idle").
shape: "rectangle" (default) or "capsule".
alpha_threshold: Opaque alpha cutoff 0..255 (default: 10).
thickness_ratio: Minimum vertical column thickness ratio (default: 0.30).
Returns:
Metadata including the written output_tscn path, sprite_frames_res URI, and collider details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shape | No | rectangle | |
| root_name | No | Character | |
| root_type | No | CharacterBody2D | |
| image_path | Yes | ||
| output_tscn | Yes | ||
| project_root | Yes | ||
| alpha_threshold | No | ||
| collider_frames | Yes | ||
| thickness_ratio | No | ||
| default_animation | No | idle | |
| sprite_frames_tres | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||