This example requires the Inventory Module for Game Creator 1 from Catsoft Works to be installed and the Example Module must be enabled. The example has been configured with Basic IK but can easily be changed to use Final IK from RootMotion. To demonstrate the VR functionality, we have used the Inventory example that is supplied with the Inventory Module, and added the VR Module components to it. We have also used the First Person Camera and Player model for this example.
The Trigger On Start sets up the First Person Camera by calling that preconfigured Action. This Action inactivates the IK Solver, changes to the first person camera motor and player model, sets the player to move with the camera direction, includes a 0.5 second wait (could be reduced) to ensure the Character model is instantiated before the IK Solver is Reset.
The Left Hand Follower has the Open Inventory Action set on the Button 1 On Press. This Action calls the GC Open Inventory, then the GC Canvas in World Space Action converts the Inventory canvas. The sample Action rescales to 0.001, adds it to the Player Object with an offset, and rotates the canvas on the horizontal to face the Camera.
The RIght Hand Follower has Show Laser Pointer on Press Trigger and Hide Laser Pointer on Release Trigger. The show laser pointer is inverted so it goes in the correct direction and the show marker is checked. The Hand State is also set to Point and with the Right Hand Mask. Similarly, the Hide Pointer links to the Show Action and has the Send Click Event on Hide checked, then resets the hand state.
All of the mouse click Triggers have been replaced with the VR Events "On Pointer Event Trigger". This will provide the same interaction as on mouse click, as you do not have a mouse. For example, on the Merchant and on the Door. This will open the Merchant UI when you click on the Merchant, and if you own the Key, the click on the Door will open it. All other functions work functions will also work, including adding the equipment such as the Hat, Armour, and Sword to the Player. The Loot Chest and Container will also work with the VR Pointer Event Trigger, however what will not work is the Hot Bar. See Limitations below:
Limitations with GC1 Inventory: