# Pathmover

## Pathmover <a href="#pathmover" id="pathmover"></a>

The Pathmover is the basic component for moving [MUs](/components-and-scripts/mu-movable-unit.md) along a path based on [Lines](/extensions/page-4/path-system/line.md) and [Curves](/extensions/page-4/path-system/curve.md). The Pathmover component must be on the same Game Object level as the [MUs](/components-and-scripts/mu-movable-unit.md) and [Source](/components-and-scripts/mu-movable-unit/source.md) script.

The Pathmover is keeping its distance to the other Pathmovers by drawing 3 Raycasts. One straight on and two to the sides. As soon as the Distance (*Distance / Distance Sides*) is fallen below the defined values, the Pathmover starts to slow down (if the Drive has a defined acceleration) or stops immediately. As soon as the Distance is above, the Pathmover starts to speed up again.

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

### Public properties <a href="#public-properties" id="public-properties"></a>

**Create On Path**\
Defines the Path where the Pathmover should be created by the [Source](/components-and-scripts/mu-movable-unit/source.md).

**Leave Path**\
If set to true the Pathmover will leave the path whenn reaching the end of a path with no successors. The MU (Transportable) will be totally under control of Physics.

**Align with Path**\
Aligns the Pathmover with the Paths tangent if true.

**Distance**\
The distance in meters, the pathmover keeps for the straight raycast

**Distance Sides**\
The distance in meters, the pathmover keeps for the side raycasts

**Angle Side**\
The angle of the side raycat.\
**Angle Side**

**Draw Ray**

**Align Vector**\
The vector of the Pathmover which should be aligned with the Path.

**Current Station**\
The current station of the Pathmover. The station is assigned when entering and deleted when leaving the station

**Current Station Working**\
The current working station, the value is set as soon as the working time starts in a station

**Is Stopping**\
true, when the Pathmover is slowing down.

**Is Starting**\
true, when the Pathmover is speeding up.

**Is Stopped**\
true, when the Pathmover is stopped (e.g. at the end of a path or in a station)

**Is Blocked**\
true, when the Pathmover is blocked (e.g. by another Pathover ahead)

**Is On Path End**\
true, when the Pathmover is on an end of a Path.

**Path**\
The current Path.

**Position**\
The current position in meters on the Path.

### Events

The Pathmover has several events and you can assign your custom code to these events.

#### Path Events

**OnPathEntered (SimulationPath, PathMover)**\
Event is fired when a new Path is entered by Pathmover.

**OnPathEnd (SimulationPath, PathMover)**\
Event is fired when a Pathmover is at the end of a Path.

**OnPathExit (SimulationPath, PathMover)**\
Pathmover is leaving the Path.

**OnStopping (SimulationPath, PathMover)**\
Pathmover is starting to stop (slowing down).

**OnStopped (SimulationPath, PathMover)**\
Pathmover is fully stopped.

**OnStart (SimulationPath, PathMover)**\
Pathmover is starting (speeding up).

**OnFullyStarted (SimulationPath, PathMover)**\
Pathmover is at full speed.

**OnBlocked (SimulationPath, PathMover)**\
Pathmover is blocked.

#### Station Events

**OnStationEntered (BaseStation, PathMover)**\
Pathmover has entered a Station.

**OnStationWorkStarting(BaseStation, PathMover)**\
Pathmover has started the work in a Station.

**OnStationWorkFinished(BaseStation, PathMover)**\
Pathmover has finished work in a Station.

**OnStationExit(BaseStation, PathMover)**\
Pathmiver has left a Station.


---

# 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/extensions/page-4/path-system/pathmover.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.
