VR pawn weirdness

Hello I’m using the premade VR pawn in 4.27. It works fine when placed in the scene. I wrote a small blueprint to spawn in the scene. Again it works, but also spawns a random sphere, only visible in VR.

The sphere is not there when just possessing the placed VR spawn. Anyone know what this is?

Hi Wolfear,

That’s the ‘Default Pawn’ - one will spawn if you have no pawn possession set up.

So probably the default pawn is spawning in the couple of frames just before spawning and possessing the VRPawn.

Try placing the VRPawn in your world and setting ‘Auto Possess Player’ to “Player 0” - Does the default pawn still spawn?

Protip: Press shift + F1 to get mouse control and scroll through your scene outliner while playing, also press F8 to depossess whatever pawn you are controlling.

Cheers

Yeah, as I mentioned before, placing the pawn in the scene like normal works fine there’s no sphere that appears. But I want to spawn the pawn through another blueprint. Is there a different way I should spawn it through a blueprint?

You’re fighting with the gameplay framework essentially. As @Astrotronic is eluding to, if you haven’t setup a default pawn, then the ‘DefaultPawn’ actor is what is spawned in its place. What was not said is that, in order to change the default pawn used then you need to create a gamemode class and change the default pawn class to the pawn you want to use, then change the game mode on your level (world) to that of the new gamemode class. Then you don’t have to spawn your pawn via blueprint, the gameplay framework will handle that for you.

With that being said, if your design requires that you create your pawn in this manner, the problem you’re having is that you’re not destroying the pawn which the player controller already has. Again, this is something that the gameplay framework has boiler plate functions to handle. For the moment though, if you want to get rid of the sphere, before possessing the newly created pawn, destroy the original pawn (DefaultPawn). You should be able to retrieve the current pawn with GetPlayerPawn and call DestroyActor.

1 Like

Ah ok thankyou!