# Pen

### Getting Started with HyperSkill's Pen Feature

#### Overview

In addition to spray painting, HyperSkill also supports painting and marking using pens. Pens enable finer control over painting, allowing users to add fine details or write.

**Getting Started**

To get started, you will need to procure a 3D model of the pen tool. This can be any 3D model you want, so long as it conforms to the following requirements:

* The collider of the object must not cover the tip of the writing tool
  * \[Recommended] Adjust the collider such that there is plenty of space for the tool tip. This will enable a smoother experience when writing/painting in VR
* There must be a child transform on the object named "Paint"
* The "Paint" transform must be scaled to be the size of the tip of the pen
  * \[Recommended] Add a 3D sphere as a child of the "Paint" transform and adjust the "Paint" scale. Keep adjusting until the sphere correctly covers the tip of the pen. The sphere visualizes the collider that is used to apply the paint. Don't forget to remove the sphere once you are done adjusting.
* Two additional transforms must be added to the pen object. These transforms must be named "PointA" and "PointB" respectively &#x20;
  * "PointA" should be positioned at the end **opposite** of the tip of the pen
  * "PointB" should be positioned at the tip of the pen

Once you have uploaded the 3D model as a virtual object to your account, you may now add the pen tool to your experience.&#x20;

<figure><img src="/files/OEkEnQMO0loYO5bwpkm1" alt=""><figcaption><p>Sample setup of a Pen in Unity</p></figcaption></figure>

<figure><img src="/files/eYj7U6MzdMT35h3v07QH" alt=""><figcaption><p>The position of Point B, at the tip of the pen</p></figcaption></figure>

<figure><img src="/files/rI7VqDeDqwIWEoFuwzpw" alt=""><figcaption><p>The configuration of the Paint transform, including the scale and a visualization of the painting collider</p></figcaption></figure>

&#x20;**Setup**

In authoring mode, you need to add some custom attributes to your pen virtual object. Add the following attributes to enable painting using the pen feature:

* Add a custom attribute named "Pen" of type "bool". The value should be set to true. If the value is true, the feature will be enabled. If the value is false, the tool cannot be used. This setting is per object, so you may have some pens that are enabled and some that are not.
* Add a custom attribute named "Color" of type "string". The value can be a named color or a hex color code.
  * The named colors support the following:
    * black
      * blue
      * clear
      * &#x20;cyan
      * gray&#x20;
      * green&#x20;
      * grey&#x20;
      * magenta
      * red
      * white&#x20;
      * yellow
  * You can use any hex color code you want
  * The "white" color is interpreted as color removal and will remove any applied paint

<figure><img src="/files/tt3dPsnjtYGoso1yaxNX" alt=""><figcaption><p>Sample attribute setup for a pen tool</p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.siminsights.com/virtual-entities-vx/special-virtual-objects/painting/pen.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
