> For the complete documentation index, see [llms.txt](https://docs.viverse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viverse.com/playcanvas-toolkit/building-with-playcanvas-toolkit/picking.md).

# Picking

***

## About

PlayCanvas Toolkit provides no-code solutions for various modes of interactivity, and one of those modes is Entity Picking. It allows the Player to grab an object by particular local point, and use it as a melee weapon, with corresponding attack animations. In addition to that, when the Entity is possessed by the Player, a special UI Overlay is displayed, showing basic controls for melee attack or droping the Entity.

## Usage

All picking functionality is implemented by a single `viversePick` component. Here is how you can add a Pickable Object to your Scene:

{% columns %}
{% column width="66.66666666666666%" %}
{% stepper %}
{% step %}

### Create Pickable Entity

* Create a new Entity in your Scene, or use an already existing one with 3D mesh attached to it
* Click **Add Viverse Component** button and select **Interaction > Pick**
* Add a **Grip Point** as a child of your Pickable Entity. This point will be used to attach your Entity to Avatar's hand bone
  {% endstep %}

{% step %}

### Launch and Test

* Adjust Entity position and rotation in your Scene, and hit Launch
* When approaching Pickable Entity you should see **Hint Icon**. Click it to grab the Entity!
* Once it's picked, you should see UI Overlay at the bottom right corner, featuring 3 buttons — Attack `F`, Attack `G` and Drop `R`
* The way that Entity is located in Player's hand depends on internal orientation of **Grip Point** inside your Pickable Entity. Adjust its position and rotation to make your Entity look better when it's carried in Player's hand
* Don't forget to relaunch your Scene for any changes to take an effect!
  {% endstep %}
  {% endstepper %}
  {% endcolumn %}

{% column width="33.33333333333334%" %}

<figure><img src="/files/zJBbW51RhZ2gIWHDhzcV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Nyy8fuNTU6TxTtaVNKQ6" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/1GnDxSRr7ZWFojDWIqus" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/mrcfcY82OvwZzVNBCfI0" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/pivQ9t6bxIYQWpn8fTYt" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.viverse.com/playcanvas-toolkit/building-with-playcanvas-toolkit/picking.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
