# Floating Interaction

`Floating Interaction` is a lightweight interaction system for FiveM that displays floating 3D help notifications in the world.

It can be used for locations, props, shops, markers, and NPCs, giving players a clean and immersive way to interact with your scripts. Labels are rendered dynamically and can include text, icons, item images, interaction distance checks, and optional NPC spawning.

With support for automatic cleanup, line-of-sight checks, the system is flexible, modern, and easy to integrate into any server setup.

### Features

* Floating 3D help notifications
* Supports icons and item images
* Interaction distance handling
* Optional line-of-sight wall check
* NPC label support with automatic ped spawning
* Automatic cleanup when no longer called
* Lightweight client-side usage
* Easy export-based integration

### How it works

The system is designed to be called continuously from a client-side loop.

As long as the export is called, the floating interaction remains visible and active.\
Once you stop calling it, the label is removed automatically after a short delay.

This makes the system perfect for dynamic interaction zones, temporary labels, NPC conversations, and context-sensitive prompts.

### Included Pages

* Installation
* Configuration

### Requirements

Before using this resource, make sure all required dependencies are installed and started correctly.

### Notes

* The export must be called continuously from a loop
* Labels are removed automatically when no longer updated
* NPCs are spawned and removed automatically when using `npcData`
* Make sure the UI is built before deploying the resource


---

# 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://mskscripts.gitbook.io/mskscripts/scripts/floating-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.
