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.

Most_FreeMovement using Most_Controller

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

Most_FreeMovement using Most_Controller and apply Raw Input

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

Custom move inside Most_FreeMovement system Using Most_Controller Swipe detector
Custom move inside Most_FreeMovement system Using Most_Controller Button
  • This System requires an Input Controller to receive commands (MOST Controller or any other input system)

  • All examples in MOST IN ONE use MOST Controller as the input source.

  • It's much better this way to be easier to modify, and if you want to use another Input system instead of MOST Controller.

  • You will find the "Input Getter" section inside the .cs file contains all functions that receive input commands for this system. Check the API.

API reference

// 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

Last updated