Introductory tutorial using Leap Motion Controller and Virtual Reality in Unity3d version 5. Included are simple steps to activate the Leap Motion Controller and Virtual Reality in Unity3d version 5 and optimize the virtual reality experience.
7. Setup LeapMotion VR Scene
• From LeapMotion>Prefabs drag a LMHeadMountedRig into your
scene Hierarchy and remove Main Camera
8. Setup LeapMotion VR Scene
• From LeapMotion>Prefabs>HandModelsNonhuman drag a
CapsuleHand_L and a CapsuleHand_R to your scene and make them
children of the Leap Hand Controller
9. Setup LeapMotion VR Scene
• From LeapMotion>Prefabs>HandModelsPhysical drag a
RigidRoundHand_L and a RigidRoundHand_R to your scene and make
them children of the Leap Hand Controller
10. Setup LeapMotion VR Scene
• Locate the HandPool component attached to the LeapHandController
• Set Model Collection value to 2 – drag capsuleHands(L/R) and
RigidRoundHands(L/R) from Hierarchy to empty slots
• Click Is Enabled and Can Duplicate on both Elements
11. Setup LeapMotion VR Scene
• Add a Directional Light source to your scene
• Add a cube and plane to your scene
• Adjust positions, scales and rotations relative to your camera
• Press play – If everything is working you should see your cube and hands
when you bring them upto the leap motion camera
12. Setup LeapMotion VR Scene
• Select the Cube in the Hierarchy and Add a Rigidbody
• Create a new contrasting material and add to your cube
• Press play You can now hold the cube in your hand
using the inbuilt Unity Physics Engine
13. Optimising for Framerates & Quality
• Select Project Settings – Quality
• Select Simple and change Anti
Aliasing to 4x Multi Sampling
• Anti Aliasing is very important in
VR and where possible should be
enabled
• Increase Default Render Scale
from 1.0 to 1.5 which increases
object sharpness – see next slide
• Avoid Dynamic Lighting where
possible – best to bake lights
14. How to Increase Render Scale
• Create new C# file called RenderScale
• Add the following code and attach script to the LeapSpace Object in your
Hierarchy
• Code is from Unity Getting Started Tutorial - http://tinyurl.com/j2elrjt