VR Prefabs and Scripts


The Prefabs included in this asset are as follows:


  • TouchStickVRMovement - this must be added to the Game Creator Preferences Panel in the Prefab Touchstick slot. It allows for Player Movement other than using the Keyboard. See below for additional settings.


  • XRRig - this must be added to you Scene and details are covered in a previous section.


  • XRManager - this also must be added to you Scene and details are also covered in a previous section.


  • UICurosrSprite -  this is used by the UI Pointer and has been added to the Line renderer component.


  • SimpleMessageVR - we have created a world space simple message canvas as a replacement for the GC simple message component. (see Quest example scene for use).



Most of the Scripts in the Components folder have already been added to Prefabs. However, the two that have not are the Grabbable Component script, and the Melee Hit Collider. The Melee script is discussed in the Melee with Free Play example scene, but the Grabbable Component is as follows.


This script should be added to any Game Object that you wish to grab. The Object will need to include a RigidBody and a Collider. The above script can then be added. You can change the Grab Placement to the Palm of the Hand or to the tip of the Index Finger. You can choose the appropriate animation to suit. The Grab Offset and rotation sets where the object is attached and this can be seen in the Scene view within the Unity editor by turning on Gizmos. The Gizmo length is also set here.

You can also disable the RigidBody colliders while the object is attached to the hand, as this is sometimes necessary when grabbing something like a steering while with a hinged joint. More on this component can be views in the Basic IK Example.


Note: The Melee Hit Collider is discussed in the Melee example Scene section.


GC Preferences Panel:  The TouchStickVRMovement prefab must be added to the Preferences panel. Also you should select Discreet for movement with the Movement Activator Action.


While you are there, change the General Render mode to World Space Camera, and add the SimpleMessageVR prefab in case you wish to use this later.

Useful Links

Pivec Labs









Full list