diff --git a/README.md b/README.md index 362b5f152a49cc8916748d09d2c9f7701cae9314..fb156d59c7f80ffc883102ffd65d948a7207e002 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,29 @@ Please note, that this cannot replace real testing on an HMD, but allows simple [[_TOC_]] ## Adding to your project -- Ideally you should add this plugin as a submodule to your project by executing `git submodule add https://devhub.vr.rwth-aachen.de/VR-Group/unreal-development/tools/hmd-simulator.git Plugins/HMDSimulator` in the root of your project. +- Ideally you should add this plugin as a submodule to your project by executing `git submodule add -b 5.3 https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/tools/hmd-simulator.git Plugins/HMDSimulator` in the root of your project. - After starting the editor you should check in `Edit->Plugins` if the plugin is enabled. -- As this plugin emulates an HMD like any other, you have to add the buttons of this HMD in your Action Mappings. For this go to `Edit->Project Settings->Engine->Input->Bindings->Action Mappings` and add the respective keys there.  +- As this plugin emulates an HMD like any other, you have to add the buttons of this HMD to the InputMappingContext files in your project. +In the case you are using the VR template that comes with Unreal itself, you have to extend the InputMappingContext files that are stored in the folder `Content\VRTemplate\Input\` as shown in the following image.  +Each InputMappingContext maps a device input such as a button press to an input action such as for example the action to grap something. +As shown in the following images, if you want to control an action inside the HMDSimulator, you have to add to the acction a mapping that uses a button of the HMDSimulator.  +For the Unreal VR template the following could be used + +**IMC_Default** +- IA_Grab_Left <-> HMDSimulator (L) Grip Button +- IA_Grab_Right <-> HMDSimulator (R) Grip Button +- IA_Menu_Toggle_Left <-> HMDSimulator (L) Menu Button +- IA_Menu_Toggle_Right <-> HMDSimulator (R) Menu Button + +**IMC_Hands** +- IA_Hand_Grasp_Left <-> HMDSimulator (L) Grip Button +- IA_Hand_Grasp_Right <-> HMDSimulator (R) Grip Button + +**IMC_Weapon_Left** +- IA_Shoot_Left <-> HMDSimulator (L) Trigger Buttom + +**IMC_Weapon_Right** +- IA_Shoot_Right <-> HMDSimulator (R) Trigger Buttom ## Configuration The HMD Simulator uses the keyboard and mouse to grab the input that is needed to emulate the controllers. As the simulator grabs these on a very high level, it catches key presses before your application can. Thus, the keys it uses can be reconfigured to fit your application. This can be done in the options of the Plugin. For this head to `Edit->Project Settings->Plugins->HMD Simulator` and configure everything to your liking. You can also change the displayed default controller model and some movement speeds there. Note that the controller model is only displayed if your project does not provide its own.  @@ -16,7 +36,11 @@ The HMD Simulator uses the keyboard and mouse to grab the input that is needed t ## Usage {- Please note, that the keys mentioned in this section only refer to the default configuration -} -Do a [VR Preview launch](Resources/VRLaunch.png) and you will see something similar to this:  +Do a VR Preview launch as shown in the following image + +and you will see something similar to this: + + Currently, the HMD Simulator emulated the two controllers and the position of the HMD. If SteamVR is running and a real HMD is detected it is used instead. If you want to explicitly use the HMDSimulator, switch off your HMD or unplug it and close SteamVR. Then restart Unreal und do a [VR Preview launch](Resources/VRLaunch.png). diff --git a/Resources/InputBindings.png b/Resources/InputBindings.png deleted file mode 100644 index e47865e45d9d1541c382f10350c72bd613e3c85e..0000000000000000000000000000000000000000 Binary files a/Resources/InputBindings.png and /dev/null differ diff --git a/Resources/Options.png b/Resources/Options.png index 54f454044b755ca319718b8199a50c538e78d61b..625a7847bee908f904ba28e485d0d5b98d6c36df 100644 Binary files a/Resources/Options.png and b/Resources/Options.png differ diff --git a/Resources/StandardView.png b/Resources/StandardView.png index de02270bd08114821506b197b31e74a3e9fb836b..443ff7a20d22f4c24aa74f7f4d3b513db272bf63 100644 Binary files a/Resources/StandardView.png and b/Resources/StandardView.png differ diff --git a/Resources/VRLaunch.png b/Resources/VRLaunch.png index 1574d1329806b8959e2ebe1ece0f1173b80170bf..8b186912cecc3f3aea8e46d193f94af8e229b1fc 100644 Binary files a/Resources/VRLaunch.png and b/Resources/VRLaunch.png differ diff --git a/Resources/VRTemplateInputFiles.png b/Resources/VRTemplateInputFiles.png new file mode 100644 index 0000000000000000000000000000000000000000..13d1283fa1a3839a751681d7aad52c3ff3740ce3 Binary files /dev/null and b/Resources/VRTemplateInputFiles.png differ diff --git a/Resources/VRTemplateInputMappingContext.png b/Resources/VRTemplateInputMappingContext.png new file mode 100644 index 0000000000000000000000000000000000000000..081dd1c7a627c8b2340f9d175f559281683deda2 Binary files /dev/null and b/Resources/VRTemplateInputMappingContext.png differ