> For the complete documentation index, see [llms.txt](https://solo-player.gitbook.io/most-in-one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://solo-player.gitbook.io/most-in-one/most-systems/most-free-move.md).

# MOST Free Move

A Control system for free (Regular) movement with custom moves support (like roll or dash) It also comes with all possible properties of a movement system, like speed, rotation speed, custom rotation speed, animation control, and camera following system (with rotation correction), and a lot more.

<figure><img src="/files/tkr6AauUj83FXjUoCJ9R" alt=""><figcaption><p>Most_FreeMovement using Most_Controller</p></figcaption></figure>

The system also supports raw inputs (direction scaled from 0 to 1)... Check API

<figure><img src="/files/s5KSJ5CBGJR25j9DgRmW" alt=""><figcaption><p>Most_FreeMovement using Most_Controller and apply Raw Input</p></figcaption></figure>

The system has a section for custom movements (like fast dashing or rolling)\
will all possible properties and live enable/disable controls...

Check examples and API for script control

<figure><img src="/files/Hs4xENDzoEITFX3Gyf5u" alt=""><figcaption><p>Custom move inside Most_FreeMovement system Using Most_Controller Swipe detector</p></figcaption></figure>

<figure><img src="/files/I51S24ngD4safndSOZew" alt=""><figcaption><p>Custom move inside Most_FreeMovement system Using Most_Controller Button</p></figcaption></figure>

{% hint style="info" %}

* <mark style="color:blue;">**This System requires an Input Controller to receive commands (MOST Controller or any other input system)**</mark>
* <mark style="color:blue;">**All examples in MOST IN ONE use MOST Controller as the input source.**</mark>
* <mark style="color:blue;">**It's much better this way to be easier to modify, and if you want to use another Input system instead of MOST Controller.**</mark>
* <mark style="color:blue;">**You will find the "Input Getter" section inside the .cs file contains all functions that receive input commands for this system. Check the API.**</mark>
  {% endhint %}

## <mark style="color:red;">API reference</mark>

{% hint style="success" %} <mark style="color:green;">**All public properties can be updated at runtime, and the changes will be set immediately.**</mark>
{% endhint %}

```csharp
// Next to each line shows the return and set data Type 

// Functions
// main behavior enables and disables the system
Most_FreeMovement.EnableState(bool Enable);

__________________ Activate/Start __________________
// Start Moving function, call it to enable/start moving
// OnInputDetected() Call it if the input doesn't provide direction yet
// Like.. when touching the screen without moving the finger... On Touch began only
// This function will move the object depending on its current rotation
Most_FreeMovement.OnInputDetected();

// OnExeedMinRange() Call it if the input already provides direction
// This function will move the object toward the input direction
Most_FreeMovement.OnExeedMinRange(Vector2 direction);

// You have to call one of these functions to start moving

__________________ Direction Update __________________
// Call it to update object direction // on controller direction updated
// OnInputUpdated() Uses the absolute value of the input direction equal to 1
// and the speed of the object is equal to the system speed
Most_FreeMovement.OnInputUpdated(Vector2 direction);

// OnRawValueUpdated() Uses the magnitude value of the input direction from 0 to 1
// and the speed of the object is equal to the system speed * that magnitude
Most_FreeMovement.OnRawValueUpdated(Vector2 direction);

// Call it to enable dash move
// OnSwipeDetected() controls the dash direction using the direction input
// and send a warning message if there is no direction (just to let you know)
Most_FreeMovement.OnSwipeDetected([Optional] Vector2 direction);

// OnAutoSwipeDetected() the dash direction will become the current
// object direction and in that case you have to enable rotation on the system
Most_FreeMovement.OnAutoSwipeDetected();

__________________ On Stop Moving __________________
// the default value for exceed = false
Most_FreeMovement.OnInputReleased([Optional] bool exceed);
// Call it to stop object from moving // on controller release

//_______________________________________________________________//

// ReadOnly variable... Check if the Move system is active or not
Most_FreeMovement.Enable; return bool

// ReadOnly variable... Quick check if the object is moving right now or not
Most_FreeMovement.IsMoving; return bool

// ReadOnly variable... Quick check if the object is using the dash right now or not
Most_FreeMovement.IsDashing; return bool

// Controls the moving part of the system, whether it enables (sends data) or not
Most_FreeMovement.EnableMove; return or set bool

// Controls the rotation part of the system if it enables (sends data) or not
Most_FreeMovement.EnableDash; return or set bool 

// Controls the rotation part of the system if it enables (sends data) or not
Most_FreeMovement.EnableRotation; return or set bool

// the target direction of the movement system
Most_FreeMovement.MoveAxis return or set (TargetAxis.X_Y or TargetAxis.X_Z) ;


// Movement Speed of the object
Most_FreeMovement.Speed; return or set float

// Dashing Speed
Most_FreeMovement.DashSpeed; return or set float

// the time that dash will be active in
Most_FreeMovement.DashDuration; return or set float

// Rotation speed of the object
Most_FreeMovement.RotationSpeed; return or set float

```
