Instrumented the movement component so the write is caught at its source rather than inferred from the actor: a UGigLineVehicleMovement subclass is substituted for the stock component through AWheeledVehiclePawn::VehicleMovementComponentName, and it logs CreateVehicle(), the first UpdateState and the component tick. mover tick: Z 661 -> 1143 -> 1443 -> 1718 ..., output null, wheels 0 physics OFF at 3 s: Z 2247, and it does not move for a whole second afterwards profile: t=0.25 Z=515 vZ=-8 | t=0.75 Z=920 vZ=-22 | t=1.25 Z=1287 vZ=173 Two conclusions: 1. The mesh's physics state IS what moves the actor - switching physics off freezes it at once. 2. It moves WITHOUT VELOCITY: position rises ~700 cm/s while vZ oscillates around zero. That is a kinematic teleport, not an impulse and not a force - which is exactly why gravity, mass and penetration all measured clean. The vehicle-state output is null throughout, so the teleport comes from the Chaos layer driving the body kinematically while the vehicle itself was never created. Pawn parked, captures regenerated so the demo stays clean.
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
#include "GigLineVehicleMovement.h"
|
|
|
|
UGigLineVehicleMovement::UGigLineVehicleMovement()
|
|
{
|
|
// The async physics step is what the transform is written from; keep it on so the failure is
|
|
// reproduced rather than hidden.
|
|
PrimaryComponentTick.bCanEverTick = true;
|
|
}
|
|
|
|
void UGigLineVehicleMovement::CreateVehicle()
|
|
{
|
|
UE_LOG(LogTemp, Warning,
|
|
TEXT("GigLine mover: CreateVehicle() entered - UpdatedComponent %s"),
|
|
UpdatedComponent ? *UpdatedComponent->GetName() : TEXT("none"));
|
|
Super::CreateVehicle();
|
|
UE_LOG(LogTemp, Warning, TEXT("GigLine mover: CreateVehicle() returned - wheels %d"),
|
|
GetNumWheels());
|
|
}
|
|
|
|
void UGigLineVehicleMovement::UpdateState(float DeltaTime)
|
|
{
|
|
if (!bLoggedFirstFrame)
|
|
{
|
|
bLoggedFirstFrame = true;
|
|
UE_LOG(LogTemp, Warning, TEXT("GigLine mover: first UpdateState - output %s"),
|
|
PhysicsVehicleOutput().IsValid() ? TEXT("present") : TEXT("null"));
|
|
}
|
|
Super::UpdateState(DeltaTime);
|
|
}
|
|
|
|
void UGigLineVehicleMovement::TickComponent(float DeltaTime, ELevelTick TickType,
|
|
FActorComponentTickFunction* ThisTickFunction)
|
|
{
|
|
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
|
Elapsed += DeltaTime;
|
|
if (Elapsed - LastLog > 0.5f)
|
|
{
|
|
LastLog = Elapsed;
|
|
UE_LOG(LogTemp, Warning,
|
|
TEXT("GigLine mover tick: Z %.0f, output %s, wheels %d"),
|
|
UpdatedComponent ? UpdatedComponent->GetComponentLocation().Z : -9999.0,
|
|
PhysicsVehicleOutput().IsValid() ? TEXT("present") : TEXT("null"),
|
|
GetNumWheels());
|
|
}
|
|
}
|