Enter search terms or a module, class or function name.
The Basics: The level design changes depending on the type of controller used in a given sublevel. This is accomplished using three blueprints.
All player location and controller interactions are accomplished via the player pawn /Content/Blueprints/VR_Pawn_Base. Barring unusual applications, this should not need to be modified. The player pawn is responsible for:
- HMD location and orientation.
- Left and right controller location and orientation.
- Left and right controller button (boolean) events.
- Left and right controller axis (float) events and values.
Communication between the pawn and various controller blueprints is accomplished via blueprint interface functions which are contained in Content/VRDemo_Assets/Blueprints/Motion_Controller_Interface_BP. The only function of this blueprint is to pass variables back and forth. Barring unusual applications, this should not need to be modified.
In each sublevel is a blueprint actor called Content/VRDemo_Assets/Blueprints/VR_Settings_Base. Its only function is to pass data such as which controller blueprint to use (gun blueprint, hands blueprint, sword blueprint, etc.) and values associated with that blueprint (offsets, scale, muzzle emitters, etc.) to the player pawn.
To change which controller blueprint to use in your sublevel:
Select the VR_Settings_Base blueprint in the sublevel.
By default, the Use This Controller Interface is on.
For development, a regular display (non-VR) can be used, and controllers will be parented to the camera. For gun-type controllers it may be useful to enable Use HUD Crosshair in Dev Mode and select the desired crosshair texture.
Choose the blueprints you wish to use for the left and right controllers via the dropdown menu labeled Controller Blueprints L-R. Input 0 is the left controller blueprint, input 1 is the right controller blueprint.
Make any adjustments necessary to the offset and scale.
- Note: these adjustments are best made in the controller blueprint itself. The settings here are a convenient place for experimenting with different values.
- If the controller is a gun which will have a muzzle blast effect, that effect can be set here.
If the controller uses a Flex emitter, as in Clown Painter, that emitter can be set.
- Note: As of this writing this variable is not used, due to the necessity of changing various emitter properties based on hardware capabilities. A method which will result in dynamic performance-based changes to a base emitter is forthcoming.
- If a controller blueprint uses trigger axis events (with float values) as opposed to simple trigger pressed/released events enable the trigger axis.
Communication between the pawn and various controller blueprints is accomplished via blueprint interface functions which are contained in Content/VRDemo_Assets/Blueprints/Motion_Controller_Interface_BP. The only function of this blueprint is to pass variables back and forth. Barring unusual applications, this should not need to be modified.
For more information on blueprint interfaces, please visit the Unreal Engine Blueprint Interface Documentation.