fix(vehicle): author wheel axles horizontally; record reverse is not the axle

Wheel axles were vertical in Unreal (the FBX armature conversion rolled them 90 deg
about X). Fix: axis_forward:X in the character preset and a Blender-Z wheel tail so the
axle lands on Unreal Y. This is correct (reference pose FL roll 180 / FR roll 0) but
does not fix the reverse: -drivetest still -2737 cm/s, and FinalRatio sign is a no-op.
The remaining cause is the Chaos wheel spin-axis convention or engine torque sign.
This commit is contained in:
zwitschi committed 2026-11-10 19:27:36 +01:00
1 parent a2f8ddccf1
commit ecdd8208db
4 files changed
+23 -2

No files matched your search

+1
View File
@@ -60,6 +60,7 @@ _METRIC = {
_CHARACTER = dict(
_METRIC,
object_types={"ARMATURE", "MESH"},
axis_forward="X",
add_leaf_bones=False,
path_mode="COPY",
embed_textures=False,
+4 -2
View File
@@ -199,8 +199,10 @@ def build_skeletal(joined, wheels, out_fbx, exp_dir):
for name, (x, y) in wheel_positions.items():
bone = edit_bones.new(name)
bone.head = (x, y, r)
# Point the bone along the axle: the wheel spins about its own Y.
bone.tail = (x, y - math.copysign(0.25, y), r)
# Point the bone along the axle in BLENDER Z: the Unreal FBX import maps (x,y,z)->
# (x,-z,-y), so a tail along Z lands on Unreal Y (horizontal axle). Opposite sides
# get opposite signs (left down, right up) so the axles point outward.
bone.tail = (x, y, r - math.copysign(0.25, y))
bone.parent = root
bpy.ops.object.mode_set(mode="OBJECT")