# How to enable class="cantap" in order to click on a 3D object attaching to wrist?

**URL:** https://forum.8thwall.com/t/how-to-enable-class-cantap-in-order-to-click-on-a-3d-object-attaching-to-wrist/1172
**Category:** Technical Support
**Created:** [April 24, 2024, 3:43pm UTC](https://forum.8thwall.com/t/how-to-enable-class-cantap-in-order-to-click-on-a-3d-object-attaching-to-wrist/1172 "2024-04-24T15:43:06Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Ian](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/ian/32/430_2.png) [@Ian](https://forum.8thwall.com/u/Ian)
#### Post date: [April 25, 2024, 7:20pm UTC](https://forum.8thwall.com/t/how-to-enable-class-cantap-in-order-to-click-on-a-3d-object-attaching-to-wrist/1172/2 "2024-04-25T19:20:17Z")

</div>

Hello @Son_Lai there are a couple steps you need to take to include a click event on a 3D model in a hand/wrist tracking experience.

First, you need to add a raycast and cusor to your camera, something like this:

```auto
  <a-camera
    raycaster="objects: .cantap"
    cursor="fuse: false; rayOrigin: mouse;"
    position="0 1.6 0"></a-camera>

```

Then you need to add the

`class="cantap"`

to the entity that you want to interact with.

Then you could write a simple component like this to test the logic (app.js)

```auto
AFRAME.registerComponent('log-on-tap', {
  init() {
    this.el.addEventListener('click', () => {
      console.log('This was clicked')
    })
  },
})

```

And make sure to add that to your entity like so

```auto
  <a-entity 
    id="model" 
    gltf-model="#your-Model" 
    class="cantap" 
    log-on-tap>
  </a-entity>

```

then you can change the logic in the custom component to whatever you want. Right nowk, this will register the click and log a message.

---

_[View the full topic](https://forum.8thwall.com/t/how-to-enable-class-cantap-in-order-to-click-on-a-3d-object-attaching-to-wrist/1172)._
