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. Hoping I can save some time experimenting by asking you guys
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?
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…