I'd like to implement movement exactly like it is done in this game. (You can see it in action on YouTube.)
I need my Player to always stay in the center of X and Y similar to grid movement, but with free movement/line like. Only move on x and y lines. And I need smooth changes at intersections.
var x = Input.getAxis("Horizontal");
var y = -Input.getAxis("Vertical");
var deltaPos = Vector2.zero;
if (Mathf.Abs(inputY) > Mathf.Abs(inputX)) {
deltaPos.Y = speed * inputY * Time.deltaTime;
}
else {
deltaPos.X = speed * inputX * Time.deltaTime;
}
transform.position += deltaPos;