#!/usr/bin/env bash # A/B/C physics probe: runs probe/probe.tscn headless under each backend by # switching physics/3d/physics_engine through override.cfg. set -euo pipefail cd "$(dirname "$0")" GODOT="${GODOT_BIN:-/Applications/Godot.app/Contents/MacOS/Godot}" ENGINES=("GodotPhysics3D" "Jolt Physics" "Box3D Physics (Extension)") mkdir -p probe/results "$GODOT" --headless --path . --import > /dev/null 2>&1 || true for e in "${ENGINES[@]}"; do printf '[physics]\n3d/physics_engine="%s"\n' "$e" > override.cfg slug=$(echo "$e" | tr ' ()' '_' | tr -s '_') echo "=== $e ===" "$GODOT" --headless --path . res://probe/probe.tscn 2>/dev/null \ | grep '^PROBE' | tee "probe/results/$slug.txt" done rm -f override.cfg