MOST Road Move

A touch-friendly straight-road movement system with smooth control, rotation direction support, camera follow, and road-bound constraints.

All Runner templates move controls use MOST Road movement

Check MOST_Runner templates

  • This System doesn't require an Input Controller to receive commands (MOST Controller or any other input system)

API reference

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

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

//_______________________________________________________________//

// The movement speed on the forward axis
[Min(0)] Most_RoadMovement.ForwardSpeed return or set float

// the max speed on x axis using touch 
// (will be used as speed if it depends on touch TouchSensitivity and maxSpeed if SmoothMovement enabled)
[Min(0)] Most_RoadMovement.MaxSideSpeed return or set float

// the strength of the reaction when touching the screen
[Min(0)] Most_RoadMovement.TouchSensitivity return or set float

// instead of an instant jump from one point to another, movement will be smoother
Most_RoadMovement.SmoothMovement return or set bool

// How smooth is the movement going to be
[Range(0.01f, 0.5f)] Most_RoadMovement.MovementSmoothing return or set float

// if enabled, the object will rotate toward the side movement direction
Most_RoadMovement.EnableRotation return or set bool

// if enabled, the MaxSideSpeed will be used to rotate the object and moves depending on rotation (using ForwardSpeed)
Most_RoadMovement.RotateAffectMoveDirection return or set bool

// the max angle the object can rotate to (in positive and negative directions)
[Range(0, 90)] Most_RoadMovement.MaxAngleOffset return or set float

// Min and Max side positions can object go to
Most_RoadMovement.RoadConstraints return or set Vector2()

Last updated