How to use any Pawn Class when spectating?

I am creating a VR game, where players should be able to spectate in VR. While spectating they should be able to teleport around the world. So it makes absolutely no sense to inherit from SpectatorPawn or SpectatorPawnMovement.

So are there any easy ways of using a class that does not inherit from SpectatorPawn as the SpectatorPawnClass?

I have already overridden parts of the Spectator code in my custom PlayerController, so I can have different SpectatorPawn classes for different players, so I will probably try to extend that code, so I can spawn any class as spectator.

It would be really nice, if the SpectatorPawn classes where a lot easier to handle for all the games, that are not the standard First Person Shooter…

Unfortunately in the following line of code is a reference to the GetSpectatorPawn() function, that would make it neccessary to change the DemoNetDriver class:

DemoNetDriver.cpp line 2267

if ( *It == SpectatorController || *It == SpectatorController->GetSpectatorPawn() )

Therefore I will probably stick to having all my VRPawns inherit from SpectatorPawn and my VRTeleportMovementComponent inherit from SpectatorPawnMovement, which seems like a really unneccessary hassle, but it is less work than changing the PlayerController and DemoNetDriver.

I really wish Epic would let us use any Pawn class as spectator. And just to be clear: Epic, despite some issues here and there you are still doing a good job overall :slight_smile: