test(vehicle): park the Chaos pawn and give the physics its own task
The pawn was found again after a cleanup removed its staging, and the diagnostic answers the zero-wheel question with a bigger one: with the pawn present the actor is launched to Z 1993 cm - 18 m above the ground it stands at 150 - and still reports 0 wheels. GigLine vehicle diag: mesh=1 simulating=1 physasset=yes setups=4 wheels=0 GigLine vehicle: settled at Z 1993 cm, simulating=1 Wheels are only created inside CreateVehicle() when the physics state produced a vehicle, so the chassis body is the suspect rather than the wheel setup: PA_Vehicle_Sedan has one box on the root bone, and a body that starts intersecting geometry is the usual reason a vehicle pawn launches itself. Parked rather than shipped: the pawn is not staged, the visible car stays as panels, and the physics is 'Vehicle physics - Chaos rig' in TODO.md with the evidence and three concrete steps. The demo no longer carries an 18 m flying car in its captures.
This commit is contained in:
1 parent
f65c6e8d45
commit
4498274328
109 files changed
+178
-130
No files matched your search
@@ -298,6 +298,29 @@ void AGigLineVehicle::Tick(float DeltaSeconds)
|
||||
DriveStart = GetActorLocation();
|
||||
}
|
||||
|
||||
// One-shot diagnostic: why zero wheels. Wheels are built in CreateVehicle(), which runs only
|
||||
// when the physics state produced a vehicle, so the useful facts are whether the mesh is
|
||||
// simulating and whether it carries a physics asset at all.
|
||||
{
|
||||
static bool bDiagnosed = false;
|
||||
if (!bDiagnosed && SettleElapsed > 3.0f && FParse::Param(FCommandLine::Get(), TEXT("probes")))
|
||||
{
|
||||
bDiagnosed = true;
|
||||
USkeletalMeshComponent* Body = GetMesh();
|
||||
const UChaosWheeledVehicleMovementComponent* Wheeled =
|
||||
Cast<UChaosWheeledVehicleMovementComponent>(GetVehicleMovementComponent());
|
||||
UE_LOG(LogTemp, Warning,
|
||||
TEXT("GigLine vehicle diag: mesh=%d simulating=%d physasset=%s setups=%d wheels=%d "
|
||||
"loc=%.0f,%.0f,%.0f"),
|
||||
Body != nullptr,
|
||||
Body && Body->IsSimulatingPhysics() ? 1 : 0,
|
||||
Body && Body->GetBodySetup() ? TEXT("yes") : TEXT("no"),
|
||||
Wheeled ? Wheeled->WheelSetups.Num() : -1,
|
||||
Wheeled ? Wheeled->Wheels.Num() : -1,
|
||||
GetActorLocation().X, GetActorLocation().Y, GetActorLocation().Z);
|
||||
}
|
||||
}
|
||||
|
||||
SettleElapsed += DeltaSeconds;
|
||||
if (!bSettleReported && SettleElapsed > 3.0f)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user