How do I update DynamicPawn in c++

My project is created in c++, so I’d like to control DynamicPawn in c++,Is that possible?

1 Like

Should be, yes.

Here’s some code snippets that the cesium-unreal performance tests use to control a Dynamic Pawn in C++.

AGlobeAwareDefaultPawn* pawn;
 
pawn = context.world->SpawnActor<AGlobeAwareDefaultPawn>(
      Cast<UClass>(DynamicPawn.LoadSynchronous()));
pawn->AutoPossessPlayer = EAutoReceiveInput::Player0;

pawn->SetActorLocation(startPosition);
pawn->SetActorRotation(startRotation);

link

1 Like