Reinforce collisions in SetSimulatePhysics(true)

This commit is contained in:
Daniel Santos-Olivan 2020-09-30 15:14:20 +02:00 committed by Marc Garcia Puig
parent b08539d7f4
commit 8bd3df5bf3
1 changed files with 5 additions and 0 deletions

View File

@ -852,6 +852,11 @@ void FCarlaServer::FPimpl::BindActions()
RESPOND_ERROR("unable to set actor simulate physics: not supported by actor");
}
RootComponent->SetSimulatePhysics(bEnabled);
RootComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
auto Vehicle = Cast<ACarlaWheeledVehicle>(ActorView.GetActor());
if(Vehicle)
Vehicle->SetActorEnableCollision(true);
}
return R<void>::Success();