- Sorry to bother you guys, I got a problem that when I using SpawnActorDeferred function try to spawn my vehicle Pawn, I will got the warning below
PIE:Warning: Warning Attempting to move a fully simulated skeletal mesh VehicleMesh. Please use the Teleport flag
-
But when I use SpawnActor to spawn my pawn, it works well without that warning
-
I’m using Controller to spawn the Pawn
-
I’m in a multiplayer project, and here’s my code
This is header file
UFUNCTION(Server, Reliable, WithValidation)
void SpawnTac(FTransform SpawnTransform);
This is CPP file
bool ATacController::SpawnTac_Validate(FTransform SpawnTransform) { return true; }
void ATacController::SpawnTac_Implementation(FTransform SpawnTransform)
{
if (HasAuthority())
{
ATacVehicle* NewTac = GetWorld()->SpawnActorDeferred<ATacVehicle>(ATacVehicle::StaticClass(), SpawnTransform);// TODO Spawn BP, teleport warning
if (NewTac)
{
Possess(NewTac);
UGameplayStatics::FinishSpawningActor(NewTac, NewTac->GetActorTransform());
}
}
}
-
The SpawnTac function is called at when game starts and when I pressed a button, but it both get the warning
-
The SpawnTransform in SpawnTac function is passed by GameMode using a PlayerStart 's transform
-
Sorry for using so many words to express, thank you.