VR with Basic IK


This Example scene is very busy and shows many features of the VR Module. The Trigger on the Left Hand will show the Arc pointer and Teleport upon release. Remember to create a Vector 3 Variable and assign to both the On Press and On Release Actions for this to work. We have named the Variable as pointerposition,(case sensitive) but it can be named anything. However the Arc Pointer Action and Teleport Action must have the same variable added for this to work.





The Right Hand Trigger will display the Laser Pointer. This can also be used as a Teleport, and alos can be used to send a click event to an Object with a VR Event Trigger. This is set on the Hide Laser Pointer Action. There is also a Drag with Laser pointer, but this is not shown in the example. See the Actions for Game Objects for more about this, but for this scene, point the Right Hand at the Large White Sphere and Press the Trigger.


On the Left Hand Buttons, we haver set on Button 1 (X on the Quest) to toggle between Adventure (3rd Person) and FPS (1st Person camera views. This calls a Condition and swaps between the Camera Motors also completing the other required Actions. On Button 2 (Y on the Quest) we have set it to swap Toggle between Adventure and Follow Camera Motors.


On the Grip for both Controllers, the Grab and Drop Object with Grab Point has been added for Left and Right Grips. The Grabbable Component has been added to the Object labelled Stick with Grab Point. This Object includes a RigidBody and a Collider. 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 and can be seen in the below Graphic.


Please Note: Any Objects that are grabbed by the Player, and are still Held when you swap views, they will be dropped. This is because the Character Model changes. If you do not change the Model, the Object is still Held.


This example scene has been created using the Basic IK script that comes with the VR Module. You will see that in 3rd Person mode, the characters elbows move incorrectly when running. We are work on this, but this Module is not intended to compete with products such as Final IK. If you require realistic motion, you should purchase an Asset specifically designed to do Inverse Kinematics such as the one mention.

However, you can also not have arms or a Body, and appear with Hans only as many other VR implementations do. We have include a Hand Only Prefab (robothands) and all you need to do is drag it to the Player Model or switch it with an Action. However, the Fingers can only be controlled using Hand Animations at this stage.


The last thing that should be mentions is that this is Work in Progress and Updates including more examples will follow. We are currently working on Hinged Grab Points for things like steering wheels, and we will build  and example where you can use both Keyboard and VRT controller, but not at the same time.

Useful Links

Pivec Labs









Full list