Language:
Page Info
Tags:
Skill Level:
Engine Version:

Motion Controller Component Setup

Choose your OS:

No matter which Virtual Reality platform you are developing for, adding support for Motion Controllers can add a level of immersion and interaction that is just not possible to achieve with a controller or mouse and keyboard. In the following How - To we will take a look at how to add Motion Controller support to the VR Platforms that support it.

Supported Platforms

The Motion Controller component that is found in the Components tab will work on the following VR platforms.

  • Oculus VR

  • Steam VR

  • Gear VR

  • Playstation VR

If you do not see the platform you are developing for listed above, make sure to check that platform's documentation for how to go about setting use of Motion Controllers.

Motion Controller Setup

In the following section we will take a look at how to add and setup the components that are needed for Motion Controllers to work.

This How - To has been written assuming that you have setup your Pawn to work with the VR Head Mounted Display (HMD) that you are developing for. If you are not sure how to do this, check please check out the getting started guide for the VR Head Mounted Display (HMD) you are developing for.

  1. First, inside the Content Browser locate and open up your Player Pawn Blueprint.

    Click for full image.

  2. In the Components section click on the Add Component button to expose the components that can be added to this Blueprint.

    Click for full image.

  3. Input Motion in the search box and then click on the Motion Controller component to add it to the components list, giving it a name of MC_Left..

    Add_MC_Component.png

  4. Select the newly added Motion Controller component and over in the Details panel under the Motion Controller section make sure the Hand is set to Left.

    Click for full image.

  5. Next, select the Motion Controller Component in the Components panel and click the Add Component button and then search for and add a Static Mesh Component, calling it SM_Left.

    Add_SM_To_MC.png

    Make sure that the Static Mesh Component is a child of the Motion Controller Component otherwise the Static Mesh will not follow along when the Motion Controller is moved.

  6. Now, in the Details panel of the Static Mesh Component under the Static Mesh section input a Static Mesh to represent what the Motion Controllers will look like. For this example we are using a simple box, but feel free to use any Static Mesh you have available.

    Click for full image.

  7. Now, duplicate the entire Left hand Motion Controller setup and re-place the word Left with Right. Also make sure to change the which hand this Motion Controller is used for by going to the Motion Controller component and then changing Hand from Left to Right.

    Click for full image.

  8. Compile and save your Pawn Blueprint, make sure it is placed in your test level and then launch your project. When you put on your HMD and pick up your Motion Controlers you should be able to now do what is shown in the following video.

Working with Motion Controllers

The Motion Controller-specific input controls are available in the Palette panel in the Blueprint Editor.

If you search inside of the Blueprint Editor Palette using MotionController as the search term you will see all the available buttons and controls the Motion Controllers have available.

Working_With_MC.png

Make sure to note that there are seperate inputs for both the Left and Right Motion Controllers. The captial L or R next to the name of the input node signfies if this is for the left or right Motion Controller.

MC_Left_Right.png

Training Streams

Tags