# Interaction

### Interaction Class

### Syntax

### Member Details

#### GetEnabled Method

> Returns true if the interaction is enabled.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) **GetEnabled** ()
>
> **Returns**
>
> > true if the interaction is enabled.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### GetPrompt Method

> Get the current Interaction prompt.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **GetPrompt** ()
>
> **Returns**
>
> > The current prompt string.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetEnabled Method

> Change an Interaction state to disabled or enabled.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **SetEnabled** ([bool](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Boolean) value)
>
> **Parameters**
>
> > *value*
> >
> > true to enable the Interaction, false to disable it.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetEnabled Method

> Change an Interaction state to disabled or enabled.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The SessionId of the agent to disable or enable the interaction for..
> >
> > *value*
> >
> > true to enable the Interaction, false to disable it.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetEnabled Method

> Change an Interaction state to disabled or enabled.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > The agent to disable or enable the interaction for.
> >
> > *value*
> >
> > true to enable the Interaction, false to disable it.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetEnabled Method

> Change an Interaction state to disabled or enabled.
>
> #### Syntax
>
> **Parameters**
>
> > *value*
> >
> > true to enable the Interaction, false to disable it.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > A legacy eventId
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetEnabled Method

> Change an Interaction state to disabled or enabled.
>
> #### Syntax
>
> **Parameters**
>
> > *value*
> >
> > true to enable the Interaction, false to disable it.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetEnabled Method

> Change an Interaction state to disabled or enabled.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The SessionId of the agent to disable or enable the interaction for..
> >
> > *value*
> >
> > true to enable the Interaction, false to disable it.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetEnabled Method

> Change an Interaction state to disabled or enabled.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > The agent to disable or enable the interaction for.
> >
> > *value*
> >
> > true to enable the Interaction, false to disable it.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetPrompt Method

> Set the Interaction prompt string.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public [void](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Void) **SetPrompt** ([string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) prompt)
>
> **Parameters**
>
> > *prompt*
> >
> > The string to set the prompt to.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetPrompt Method

> Set the Interaction prompt string.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The sessionId of the user to change the prompt for.
> >
> > *prompt*
> >
> > The string to set the prompt to.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetPrompt Method

> Set the Interaction prompt string.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > The agent to change the prompt for.
> >
> > *prompt*
> >
> > The string to set the prompt to.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetPrompt Method

> Set the Interaction prompt string.
>
> #### Syntax
>
> **Parameters**
>
> > *prompt*
> >
> > The string to set the prompt to.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> **Returns**
>
> > A legacy eventId
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetPrompt Method

> Set the Interaction prompt string.
>
> #### Syntax
>
> **Parameters**
>
> > *prompt*
> >
> > The string to set the prompt to.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetPrompt Method

> Set the Interaction prompt string.
>
> #### Syntax
>
> **Parameters**
>
> > *sessionId*
> >
> > The sessionId of the user to change the prompt for.
> >
> > *prompt*
> >
> > The string to set the prompt to.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### SetPrompt Method

> Set the Interaction prompt string.
>
> #### Syntax
>
> **Parameters**
>
> > *agent*
> >
> > The agent to change the prompt for.
> >
> > *prompt*
> >
> > The string to set the prompt to.
> >
> > *handler*
> >
> > Handler to be called when the event completes.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Subscribe Method

> Subscribes to Interaction Events.
>
> #### Syntax
>
> **See Also**
>
> **Parameters**
>
> > *callback*
> >
> > Callback which is executed when the event completes.
> >
> > *persistent*
> >
> > Optional, set to false to unsubscribe after one event.
>
> **Returns**
>
> > An [Sansar.Script.IEventSubscription](/latest/script-api-docs/sansar-script-namespace/ievent-subscription.md) that can be used to cancel the subscription.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***

### InteractionData Class

Handler for Interaction events.

### Syntax

### Member Details

#### AgentId Property

> The SessionId of the agent who clicked the Interaction.
>
> #### Syntax
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ControlPoint Property

> The ControlPoint that triggered the Interaction.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [ControlPointType](https://help.sansar.com/hc/en-us/articles/115004507483) **ControlPoint** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### HitNormal Property

> The normal direction at the position of the Interaction.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **HitNormal** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### HitPosition Property

> The position of the Interaction.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **HitPosition** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### Origin Property

> The position of the start of the ray that triggered the Interaction.
>
> #### Syntax
>
> \[get: Sansar.Script.Interface]\
> public [Sansar.Vector](/latest/script-api-docs/sansar-namespace/vector.md) **Origin** { get; }
>
> **Value**
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

#### ToString Method

> A string representation of this object.
>
> #### Syntax
>
> \[Sansar.Script.Interface]\
> public override [string](http://www.go-mono.com/docs/monodoc.ashx?link=T:System.String) **ToString** ()
>
> **Returns**
>
> > A string representation of this object.
>
> #### Remarks
>
> #### Requirements
>
> **Namespace:** Sansar.Simulation\
> **Assembly:** Sansar.Simulation (in Sansar.Simulation.dll)\
> **Assembly Versions:** 1.1.0.0
>
> ***

***


---

# 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.sansar.com/latest/script-api-docs/sansar-simulation-namespace/interaction.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.
