- Home
- Skills
- Game Development
- godot blender physics
godot blender physics
Bridge the Blender-to-Godot pipeline with scripted asset generation, axis-correct physics, and headless testing.
$5
Works with the AI Agents you already use
godot blender physics
Example session with this skill installed
I need to detect which face of a custom 6-sided die is pointing up in Godot 4 after it stops moving, and I need a way to trigger a sound when it hits the floor.
- Read your context and instructions
- Compiled the godot blender physics
To detect the up-face and trigger impact sounds, you need to handle the basis transformation correctly and monitor velocity deltas rather than relying on noisy contact signals.
Physics Logic Implementation
extends RigidBody3D
# Godot Y-up mapping for a Blender-generated cube
# Adjust these vectors if your Blender-to-Godot axis table changes
const FACE_VALUES = {
Vector3.UP: 1, # +Z in Blender
Vector3.DOWN: 6, # -Z in Blender
Vector3.LEFT: 3, # -X in Blender
Vector3.RIGHT: 4, # +X in Blender
Vector3.FORWARD: 2, # -Y in Blender
Vector3.BACK: 5 # +Y in Blender
}
var _prev_velocity := Vector3.ZERO
var _quiet_ticks := 0
func _physics_process(delta: float) -> void:
if _quiet_ticks > 0:
_quiet_ticks -= 1
_prev_velocity = linear_velocity
return
# 1. Impact Sound Detection
var jolt := linear_velocity - _prev_velocity - get_gravity() * delta
if jolt.length() > 0.5: # Threshold to ignore micro-jitter
_play_impact_sound(jolt.length())
_prev_velocity = linear_velocity
func get_up_face_value() -> int:
var best_dot := -1.0
var result := 0
for local_axis in FACE_VALUES:
# Transform local face direction to world space
var world_axis := global_transform.basis * local_axis
var dot := world_axis.dot(Vector3.UP)
if dot > best_dot:
best_dot = dot
result = FACE_VALUES[local_axis]
# Return 0 if the die is cocked (not clearly facing up)
return result if best_dot > 0.707 else 0
func _play_impact_sound(intensity: float) -> void:
# Implementation for audio playback
pass
Next steps
- Sync Axis Table: Ensure the
FACE_VALUESdictionary matches your Blenderbpyexport script's orientation. - Tune Gravity: If the die feels "floaty," increase
physics/3d/default_gravityto ~18.0.
Implement Rest Logic: Add a frame counter to ensure linear_velocity stays below a threshold for 8+ frames before calling get_up_face_value().
Connects securely to your tools. The creator never sees your data.
About this skill
Building physics-based assets across the Blender-to-Godot pipeline often leads to silent failures, axis-alignment headaches, and non-deterministic behavior. This skill provides the specific patterns and debugging protocols required to manage procedurally generated rigid bodies from mesh generation to headless testing.
What it does
- Automates mesh pipelines via Blender Python scripts to generate glTF/GLB assets as build artifacts.
- Synchronizes axis mapping between Blender Z-up and Godot Y-up frames to ensure accurate face-up detection and spatial orientation.
- Refines physics behavior with specific logic for rest detection, "cocked" state correction, and velocity-based impact sound synthesis.
- Enables headless testing using fixed-FPS simulation for fast, deterministic verification of physics scenes.
- Facilitates binary testing through a TCP-based remote input protocol to drive exported Godot builds.
How it works
- Script the asset in Blender using
bpy, ensuring boolean modifiers useTRANSFERmode and the evaluator handles the depsgraph correctly. - Import to Godot using headless import commands to refresh the cache and pinning the
.importfiles in version control. - Implement rigid body logic in GDScript using the provided patterns for
PhysicsServer3Dstate management and dot-product face detection. - Run simulations in headless mode with
--fixed-fpsto validate physics distribution and labeling without real-time overhead.
Frameworks & tools
This skill is built for Godot 4.x and Blender 5.x (or late 4.x). It utilizes Python (bpy) for asset generation, GDScript for game logic, and Bash for CI/CD and headless CLI operations.
Why this beats prompting it yourself
Generic AI prompts often miss the "silent" traps of the Blender-to-Godot pipeline, such as row-major .tscn transform orientations or stale glTF caches. This skill implements specific, battle-tested solutions for axis conversion tables and physics server state synchronization that prevent hours of debugging phantom collisions or misaligned meshes.
Use cases
- Procedural prop generation for games requiring randomized but physically accurate items like dice, tiles, or tokens.
- Automated asset pipelines where meshes must be rebuilt and reimported via CLI without manual intervention.
- Deterministic QA for physics-heavy games that need to run 100+ simulations in seconds to verify balance.
- Remote test drivers for verifying that an exported game binary behaves identically to the editor version.
Known limitations
Does not support byte-reproducible GLB exports when using Blender's EXACT boolean solver. Requires manual synchronization of axis tables between Python and GDScript sources.
Boolean EXACT solver prevents byte-perfect GLB diffing. Axis tables must be manually synced across languages. Requires Godot export templates for binary testing.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 27 days ago