fix(vehicle): raise the chassis box above the ground (float 33m -> 7.8m)
Box.Center was -Extent.Z*0.25 (below the root bone); the box then sat under the ground and the suspension pushed the chassis up. Raising it to +Extent.Z*0.35 cuts the float from ~33 m to 7.8 m, confirming the direction. Still not settled - the box centre and/or the root bone (grounded at Z 0 by normalise_scale) need to move to the car's centre of mass.
This commit is contained in:
1 parent
63ba9d91ce
commit
84291a5270
2 files changed
+16
-1
No files matched your search
@@ -56,7 +56,11 @@ UPhysicsAsset* UGigLineVehicleBuilder::BuildPhysicsAsset(USkeletalMesh* Mesh,
|
||||
Box.X = Extent.X * 1.9f;
|
||||
Box.Y = Extent.Y * 1.8f;
|
||||
Box.Z = Extent.Z * 0.55f;
|
||||
Box.Center = FVector(0.f, 0.f, -Extent.Z * 0.25f);
|
||||
// The chassis body must sit ABOVE the ground (the car body is at Z 0..height), not below
|
||||
// the root bone. The old -Extent.Z*0.25 put the box below the ground and the suspension
|
||||
// (measured against the root bone) then pushed the chassis upward. Place it at the car's
|
||||
// mid-height instead.
|
||||
Box.Center = FVector(0.f, 0.f, Extent.Z * 0.35f);
|
||||
Body->AggGeom.BoxElems.Add(Box);
|
||||
PhysicsAsset->SkeletalBodySetups.Add(Body);
|
||||
|
||||
|
||||
@@ -1147,3 +1147,14 @@ Historical task context from 2026-11-09/10; later vehicle findings above may sup
|
||||
the suspension rest length is measured against the root BONE, not the box, so the box offset
|
||||
may be the push. Next: try `Box.Center = (0,0,+Extent.Z*0.3)` or drive the box from the
|
||||
wheel-bone height, then re-run `-drivetest`.
|
||||
|
||||
## 2026-11-10 — Box centre: raising it cuts the float, but it persists
|
||||
|
||||
- `Box.Center = Extent.Z*0.35` (was `-Extent.Z*0.25`) cuts the float from ~33 m to **7.82 m**
|
||||
(`settled at Z 782`, ground at Z 5). Direction confirmed: the chassis box belongs above the
|
||||
ground, not below the root bone. Still not settled, so the box centre needs to go higher toward
|
||||
the car's centre of mass (~0.7 m), and/or the root bone should sit at the centre of mass rather
|
||||
than at the ground (the `normalise_scale` grounds the whole car, so the root bone is at Z 0).
|
||||
- The hot-hatch skeletal mesh now imports (403 x 148 x 158 cm), but the mesh is rolled (height Y,
|
||||
width Z) while the armature is correct - the MESH vertices are exported raw (identity) while the
|
||||
ARMATURE is baked with the FBX conversion, the same mesh-vs-armature split as before.
|
||||
Reference in new issue
Block a user