Usage

How to use CLAP in Unity

After CLAP package is properly installed in your Unity project, this tutorial will help you to create a sample scene with hand-object interaction from scratch.

1. Create a new scene.

2. Add/Drag CLAP prefab (Packages/CLAP/Prefabs/CLAPHand.prefab) to the scene

3. Add/Drag the object you want to interact with to the scene.

This object has to contain a closed mesh in order to properly work with the contact simulation. Also, CLAP needs to read the mesh, so make sure you keep activated the option “Read/Write Enabled” in the import settings of the mesh as shown in the following screenshot:

4. Add “Interaction Object” component to the object.

In the inspector, select Add Component and search for “Interaction Object”.

You will notice that some scripts and a Rigidbody are now attached to the object.

Make sure the object is scaled properly and reachable. You can always take the CLAP hand in the scene as reference for this.

5. Press play

If you have a Leap Motion already installed and plugged into your PC you can already press play and enjoy the hand-object interaction!

Otherwise, if you are working with Oculus Quest, you will need to follow the corresponding tutorial to build and load the project in the headset.