Set the VR Pawn location and rotation to camera

I want to reset the location and rotation of the VR Pawn to the camera’s location and rotation when the game is played, however, I’m finding that only when the headset is in a particular position, that I can see the camera’s view.

Since the VR Pawn is being spawned when the game is run, how can I make the changes in the blueprint itself?

I tried attaching the bp in the scene to the camera, but it doesn’t seem to be working as expected.

Unrelated, there’s a headset static mesh appear in the scene - anyway to remove this without disabling the VR Pawn?

Hi Sinnik,

I don’t completely understand what you’re trying to accomplish.

Try using the ‘Reset Orientation and Position’ node to “reset” your VR Pawns camera direction. (“Camera View”?)

For the headset mesh - do you have an extra VR_Pawn placed in the scene? (The pawn you’re spawning as might be set in the ‘Game mode’)

It’s possible to not use a Game Mode and just set ‘Auto Possess Player’ to “Player 0” on your pawn.

Hi Astrotronic, thank you for responding. I’m currently using a sequence where the camera moves along a rig rail and switches levels with the help of an event trigger at the end of the sequence in that level. After adding a VR template to my project, I can see the sequence being played through VR preview option. However, the user has to be in a particular position to follow along. I want the VR Pawn to be spawned in the same position the camera is in despite how the headset is positioned in real.

For the headset mesh - do you have an extra VR_Pawn placed in the scene? (The pawn you’re spawning as might be set in the ‘Game mode’)

I don’t have it added in the scene, however it is a part of the project settings where default pawn is set to the VR Pawn. I’ve not made any changes to the VR Pawn blueprint and it’s the same as in the starter pack.

Thanks for the info.

I’d think less in terms of spawning a new Pawn, and just attaching your current pawn to something that’s moving along the rig rail. (The ‘Camera’ will always be the one inside of the VR Pawn)

(Also using that ‘Reset Orientation and Position’ could help with centering the player on the rail if they have moved within their playspace)

Thank you! I think this might work. But when I add VRPawn to the scene and auto-possess it, the VR Preview doesn’t work. I’m unable to check if it’s actually moving along the camera.