Toggle between HMDLocomotionPawn and FirstPersonCharacter ?

This is for Archviz, I want to switch between players in game.
I have achieved switching the players in game but the controllers don’t add up.
I have exported the input settings but still there is camera tracking difference between first person and VR.

What do you mean by “the controllers don’t add up”?

And also the camera is still active using the hmd.

I have two players:

  1. First person controller
  2. Hmdlocomotion pawn

I want to toggle between players with input of a key.
I am able to do it, except that,
When I switch to first person shooter, the camera doesn’t look up and down.

And also the camera is still active using the hmd,
Camera is attached on to the hmd, while on the first person

Awesome thanks! Will check this out and let you know.

Ok try this:

  • before unpossessing the VR pawn, detach and destroy the motion controllers which have been dynamically generated and attached to it
  • call Enable HMD with Stereo set to false to exit the VR mode
  • unpossess the VR pawn and possess the First Person Pawn
1 Like

Can you give me rough picture of the blueprint…

Thank you so much… I am almost there… will update you if it works out! Thank you!

This is an example on how to destroy the VR Pawn and possess another Pawn. In this case the switch happens on Overlap, but you can use any other kind of trigger event. The Pawn is based on the MotionControllerPawn from the standard Epic’s VR Template.

1 Like

Here is my real problem:

My ‘FirstPersonCharacter’ works fine in Preview: Selected Viewport
but when I posses the HMDLocomotionpawn the camera stops functioning(movement is fine)

My ‘HMDLocomotionPawn’ works fine in Preview: VR Preview
but when I posses the ‘FirstPersonCharacter’ the camera stops functioning (movement is fine)

It is becoming difficult to help without being able to see your project. Any chance you can share it or at least a subset of it reproducing the issue?

This is what i meant by previews

This is basic bp for switching players with input

If you just want to start your application either as First Person or VR, then the scenario is much easier. The solution is already in the standard FPS template provided by Epic. All the logic to detect whether an HMD is present and activate the VR mode, or stick to First Person mode, is already done for you.

Regarding your possess/unpossess Blueprint above, what you are doing is not enough. When going from VR to First Person, the Motion Controllers will still hang around if don’t Destroy them first. I posted the Blueprint I use few comments above, you can just copy it.

Okay this is what I want to achieve:
After packaging the project:

When you open the .exe file it open on a pc monitor as first person shooter,
but at the input of a key,
you can also enter using a VR headset.

So basically switchin between VR (HMD) and First person (on a Monitor)

The below BP seems to be the answer I was looking for, however two things are missing still

  1. Destroy Actor
  2. Respawn new charactor at same location

However not been able to Respawn yet…