> For the complete documentation index, see [llms.txt](https://doc.realvirtual.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.realvirtual.io/components-and-scripts/scene-interaction/3d-buttons.md).

# 3D Buttons

The 3D button prefabs mimic real world physical buttons and their signal communication and lay in the 3D space of your digital twin.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-780cf16631c5d3190212b9e6101085287b53b88f%2FScreenshot%202025-01-20%20142649.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

We provide 4 drag and drop prefrabs under realvirtual/3DPrefabs/ControlCabinet. Each button has at least one connected signal reflecting the current state of the button. In playmode, the user can simply toggle the state of each button by clicking it directly in the 3D space.

## EmergencyButton

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-987fafbb879cc258c154178ad98aca5e32817457%2FScreenshot%202025-01-20%20134908.png?alt=media" alt="" width="115"><figcaption></figcaption></figure>

The emergency button has a fairly simple set up. it has a connection to a PLCInputBool signal representing the current state of the button. Additionally the user can select if it is active when starting play mode.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-558f1882e93bb1f0c671e9b42b2cad71251ef951%2FScreenshot%202025-01-20%20135643.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

## HandleSwitch

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-b80aad48913ab67eed30d303728b2b413ee0b4ec%2FScreenshot%202025-01-20%20134846.png?alt=media" alt="" width="127"><figcaption></figcaption></figure>

The handle switch behaves identically to the emergency button and has the same properties. The handle switch comes with a second variant sharing the same functionality.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-bf369f60a901d79aab9e57ed844302ae2159e72e%2FScreenshot%202025-01-20%20142418.png?alt=media" alt="" width="141"><figcaption></figcaption></figure>

## PushButton

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-ef1d23512ab7f2b2695d052b5484b43f8a2df921%2FScreenshot%202025-01-20%20134824.png?alt=media" alt="" width="140"><figcaption></figcaption></figure>

The push button implements some additional features to the functionality described above.

Besides the state signal, the user can reference a light signal (PLCOutputBool). If the light signal is not set, the button light reflects the current state of the button, otherwise the light is controlled by the light signal.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-e4182ef3ced12a4b2e1a9bad120f2174f0493986%2FScreenshot%202025-01-20%20135757.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

Additionally, the push button can not only act as a toggle but also as hold button. To enable the click and hold mode, simply turn off the Toggle option in the inspector.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-4f388dfa5cc7fd2d105bba96485996ef198576cf%2FScreenshot%202025-01-20%20135818.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

The button will now only be active while the user is clicking and holding the button, onrelease the button turns of after a minimum total pushing time which is defined by the Timer in the inspector.

Moreover, the user can set the label text of the button by changing the label in the inpector.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.realvirtual.io/components-and-scripts/scene-interaction/3d-buttons.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
