Changing Control scheme's for VR in game.

Well, I’ve tested and setup a number of different controls for VR.

Some players get motion sickness, some don’t. Some Prefer certain setups, etc, etc.

I want to start this game with the player having the ability to “try” some different control setups. I don’t need help setting up controls, I need a hand on discovering how UE4 handles the switching.

Let’s say for instance I want the player to start with a basic point to teleport control movement. Which is already setup in the VR example. However, I want them to be able to switch to a new control setup I’ve created. Like turning the HMD past 90 degrees to start rotating the camera and using a joystick to move around. (Again, I don’t need help setting this up, just on how to switch between them)

I’d like the player to be able to switch to the control scheme they prefer in the beginning, and have it switch-able in game.

Should this all be created in the same player controller? IE: the “Motion Controller Pawn”? And what would be an appropriate way to have UE4 switch between some preset control schemes?

I thought about duplication the Motion Controller Pawn and creating different control presets inside of it, and just possessing each pawn, but I’d like some opinions first, as I’m not even sure it would work. Any help would be great.

Would it also work to just combine everything under it’s own seperate bool perhaps? For instance, having one preset with all the controls scripted, and just toggle the entire code with a bool? and switch back and forth? I’m only like 75% sure on how to do this. :stuck_out_tongue: Hoping I can save some time experimenting by asking you guys :stuck_out_tongue:

Well, the easiest way would be having either booleans in front of your controls, so for example “bUseTeleport” and “bUse90DegreeMotion” and set them
to enable or disable the movement.

You could also make a single ENUM variable with all the different controls and just checking “Is ENUM = Teleport” or “Is ENUM = 90DegreeMotioN”.

What ever you use in the end, you would then setup a UI in your game for options in which the Player can select the controls he wants to use.

You could use different Pawns, but possessing them might freak out the camera for a second. I don’t know how well that works with an HMD.
You might need to darken the screen before doing that.

It would definitely be the cleanest version to have different pawns.

Thanks eXi, I appreciate some of the feedback. I guess I never thought about using Enums. So what would be the right way to possess the pawn? I know of like 3 different ways to unpossess and possess pawns, but what would be the best approach for it? Is any way better then the other?

Current way

Hm, I guess what ever works best for you. If you go with the possessing way, then simply destroy the old pawn, spawn the one and possess it. I would test of it works without problems in VR due to the camera.

If it acts weird during the pawn change, simply use a PostProcess material and lerp from normal to black and then back. We do this in our VR game for repawning the Player.

Here’s how I did it. (I did this inside of my motion controller pawn)

I tested this in HMD and I literally can’t even tell when I use my test “F”. It works perfectly without a hitch. No glitch, no camera tweaking or anything. Works perfectly. Can’t even tell I switched pawns this way.


After testing it more, I guess the old pawn is still in the game. Still floating hands waiving back to me. . . Little creepy. lol. Might have to fix the deletion of the old pawn. will post fix.

Edit: Stumped… Can’t figure it out. What I think is happening is I duplicated the motioncontroller pawn and was working with that.

However inside of it, it’s trying to spawn the BP_MotionController. So when I spawn my NEW motion controller with the different controls inside of it, It’s spawning the BP_MotionController again. However, I can’t seem to figure out how to NOT spawn the controller again. At least I “THINK” that’s what’s wrong…

I can’t just unplug the link from this spawn, or it will give me all kinds of errors. Not 100% sure on how to get rid of the duplicate hands things when I switch my pawns.

Ehm, the Pawn and the Hands are two different things.

If you possess and unpossess, you are affecting the Pawn. That does not mean that the Hands
will be removed.

Pawns have an Event called “On Unpossess” or something like that.
Simply destroy the Left and Right Controller when that happens.