MOST Grid Move

A Control system for grid movement (square step movement) with all possible properties of the grid movement like 8-directions movement, speed, obstacles detection, direction correction system, stop point snap, animation control, camera following system (with rotation correction), and much more.

Explosion Template uses MOST_GridMovement

The system can detect obstacles (layer mask can be controlled) so the character stops when it is blocked by another object.

also, it comes with a Direction corrector system that makes the character correct its movement direction when the input direction is blocked by obstacles.

4-Directions Movement using MOST_GridMovement + MOST_Controller

8-Directions Movement using MOST_GridMovement + MOST_Controller
  • This System requires an Input Controller to receive commands (MOST Controller or any other input system) and all examples in MOST IN ONE use MOST Controller.

  • 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 API.

__________ * API * __________

// All attributes are set and get so you can modify or call
// Next to each line shows the return and set data Type 


// Functions
// main behavior enable and disable controller
Most_GridMovement.EnableState(bool Enable);

__________________ On Start Moving __________________
// Start Moving function, call it to enable/start moving
Most_GridMovement.OnInputDetected() // you can call it if the input doesn't provide direction yet
                             // Like.. when touch screen without moving the finger
                             // This method will move the object depending on its rotation
// Optional to call... you can just call OnInputUpdated() to start moving

__________________ On Direction Update __________________
// Call it to update object direction // on controller direction updated
Most_GridMovement.OnInputUpdated(Vector2 direction)

__________________ On Stop Moving __________________
// the default value for exceed = false
Most_GridMovement.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_GridMovement.Enable; return bool

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

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

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

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


// Grid size for MoveAxis
Most_GridMovement.GridSize; return or set float

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

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

Last updated