57 UE_LOG(LogCarla, Warning, TEXT(
"Error: Owner is not properly set for UCarSimManagerComponent") );
60 CarlaVehicle->GetVehicleMovementComponent()->SetComponentTickEnabled(
false);
61 CarlaVehicle->GetVehicleMovementComponent()->Deactivate();
62 CarlaVehicle->GetMesh()->PhysicsTransformUpdateMode = EPhysicsTransformUpdateMode::ComponentTransformIsKinematic;
63 auto * Bone =
CarlaVehicle->GetMesh()->GetBodyInstance(NAME_None);
66 Bone->SetInstanceSimulatePhysics(
false);
73 FVector CurrentVelocity(0, 0, 0);
78 CarlaVehicle->GetMesh()->SetPhysicsLinearVelocity(CurrentVelocity,
false,
"Vehicle_Base");
79 CarlaVehicle->GetVehicleMovementComponent()->SetComponentTickEnabled(
true);
81 CarlaVehicle->GetMesh()->PhysicsTransformUpdateMode = EPhysicsTransformUpdateMode::SimulationUpatesComponentTransform;
82 auto * Bone =
CarlaVehicle->GetMesh()->GetBodyInstance(NAME_None);
85 Bone->SetInstanceSimulatePhysics(
true);
91 CarlaVehicle->GetMesh()->SetCollisionResponseToChannel(ECollisionChannel::ECC_WorldStatic, ECollisionResponse::ECR_Block);
92 CarlaVehicle->GetMesh()->SetCollisionProfileName(
"Vehicle");