fix(vehicle): enable ChaosVehiclesPlugin so the Chaos vehicle is actually created
The Chaos vehicle never existed: ChaosVehiclesPlugin is EnabledByDefault=false and was absent from GigLine.uproject, so FChaosVehicleManager was null and OnCreatePhysicsState skipped CreateVehicle() (read from the engine source). The pawn stayed at setups=4 wheels=0 output=null and the mesh fell back to the regular rigid-body solver, which is what teleported upward. - Enable ChaosVehiclesPlugin in GigLine.uproject. CreateVehicle() now runs: 'wheels 4', 'output present', 'setups=4 wheels=4'. - Drop the constructor's SetSimulatePhysics(true) / collision-profile override: the Chaos movement component drives the mesh through async physics, and forcing the regular solver kept the body out of the vehicle solver. The plugin fix turns the teleport into a stable 'float at Z 545' (540 cm above the floor) in both probe maps - suspension tuning is the next bug.
This commit is contained in:
1 parent
620cbe181c
commit
5e328f5d3e
3 files changed
+17
-3
No files matched your search
@@ -14,6 +14,10 @@
|
||||
{
|
||||
"Name": "EnhancedInput",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "ChaosVehiclesPlugin",
|
||||
"Enabled": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -65,9 +65,12 @@ AGigLineVehicle::AGigLineVehicle(const FObjectInitializer& ObjectInitializer)
|
||||
{
|
||||
Body->SetSkeletalMesh(MeshFinder.Object);
|
||||
}
|
||||
Body->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
|
||||
Body->SetCollisionProfileName(TEXT("PhysicsActor"));
|
||||
Body->SetSimulatePhysics(true);
|
||||
// The Chaos vehicle movement component drives this mesh through its async physics; it
|
||||
// calls CreateVehicle() on the movement component, which builds the wheels and the
|
||||
// vehicle state. Calling SetSimulatePhysics(true) here instead put the mesh into the
|
||||
// REGULAR rigid-body solver, which is why CreateVehicle() never ran (output null,
|
||||
// wheels 0) and why the plain body then teleported upward in DemoMap. Leave the physics
|
||||
// to the movement component.
|
||||
}
|
||||
|
||||
if (UChaosWheeledVehicleMovementComponent* Movement =
|
||||
|
||||
Reference in new issue
Block a user