Existing actors in replayer are positioned to the initial position. (#3328)
This commit is contained in:
parent
fb96d7f6c7
commit
9586cd24d5
|
@ -54,6 +54,10 @@ std::pair<int, FActorView>CarlaReplayerHelper::TryToCreateReplayerActor(
|
|||
if (desc->Id == ActorDesc.Id)
|
||||
{
|
||||
// we don't need to create, actor of same type already exist
|
||||
// relocate
|
||||
FRotator Rot = FRotator::MakeFromEuler(Rotation);
|
||||
FTransform Trans2(Rot, Location, FVector(1, 1, 1));
|
||||
view.GetActor()->SetActorTransform(Trans2, false, nullptr, ETeleportType::TeleportPhysics);
|
||||
return std::pair<int, FActorView>(2, view);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue