# Interact3D

The Interact3D script alows you to define user interaction like pushbuttons, switches or opening of doors in the 3D scene. This script can be attached to any component with a collider. If the user is clicking on the object the status will change.

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

### Properties <a href="#properties" id="properties"></a>

You can set the following properties

**Switch**\
True if interaction should work like a switch, if false it works like a button.

**MaterialOn**\
Material which should be used for Mesh renderer for the ON status of the Switch or Button.

**MaterialOnMouseDown**\
Material which should be used for the Mesh renderer on mouse down.

**MaterialOnBlocked**\
Material which should be used if interaction is blocked by a PLCSignal

**DurationMaterialOnBlocked**\
Duration of visual feedback with MaterialOnBlocked. If user is pressing button and it is blocked by PLC the blocked status will be visualized.

**MaterialPLCOn**\
Material which should be used if PLC Output signal SignalOn is true.

**LightOn**\
Optional light which is turned on on ON status.

**LightPLCOn**\
Optional light which is turned on if PLC Output signal SignalOn is true.

**SignalIsOn**\
PLCInput if button or switch status is on.

**SignalOn**\
PLCOutput to turn PLCOn Status on.

**SignalBlocked**\
PLCOutput to block interaction with button (e.g. for security doors).

\
\
\
\
© 2025 realvirtual GmbH [https://realvirtual.io](https://realvirtual.io/) - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.


---

# 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://doc.realvirtual.io/components-and-scripts/scene-interaction/interact3d.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.
