Help! Player script one step at a time add rotate and jump

hi ive set up a script to mimic pokemons tile by tile movement system this worked fine but i wanted something slightly different imagine temple run on an open plane, dependant on an invisible grid for movement.
so the player should be constantly moving forward, rotation just rotates on the spot and the player carries on going straight

right now im depending on a start point and ending point and lerping from one to the other which isnt as smooth as it maybe could be but im still a noob at unity and scripting. my main issue is the way ive used my vector 3 its constantly adding to the x axis so when i rotate 90’ it looks like im moving to the side because the script doesnt know ive rotated

anything in multi line comments doesnt work correctly but is what ive tried using, (it rotates the player but i dont know how to update the rest to say
if (rotation == 90) { do this }

public int rotateSpeed;
public float speed;
public float increment;
public float distToGround;
public float jumpSpeed;
public Vector3 startPoint;
public Vector3 endPoint;
public bool isMoving;
public bool isGrounded;
public Rigidbody rb;
public CapsuleCollider sonicDroid;

void Start () {
    startPoint = transform.position;
    endPoint = transform.position;
    rotateSpeed = 90;
    jumpSpeed = 6.0f;
    rb = sonicDroid.GetComponent<Rigidbody>();
    rb.AddForce(1, 1, 1);
    distToGround = sonicDroid.bounds.extents.y;

}
void Update () {
if(increment <=1 && isMoving == true)
    {
        increment += speed/10;
    }
    else
    {
        isMoving = false;
        isGrounded = true;
    }
    if (isMoving)
        transform.position = Vector3.Lerp(startPoint, endPoint, increment);
    if (isMoving == false)
    {
        increment = 0;
        isMoving = true;
        startPoint = transform.position;
        endPoint = new Vector3(transform.position.x, transform.position.y, transform.position.z + 1);
    }

   //turn left
    /**
    else if(Input.GetKey("a")&& isMoving == true){
     increment = 0;
     isMoving = true;
     startPoint = transform.position;
     endPoint = new Vector3(transform.position.x,transform.position.y,transform.position.z);
     transform.Rotate(Vector3(0,90,0));
     }
     **/
    //turn right
    /**
     else if(Input.GetKey("d")&& isMoving == true){
     increment = 0;
     isMoving = true;
     startPoint = transform.position;
     endPoint = new Vector3(transform.position.x,transform.position.y,transform.position.z);
     transform.Rotate(Vector3(0,90,0));
  }
 **/

   else if (Input.GetKeyDown("space")&& isGrounded == true)
    {
        rb.velocity += Vector3.up * jumpSpeed;
        isMoving = false;
        isGrounded = false;
    }
}
 }

it also wont jump? which is strange as i think my code i okay?
and and all suggestions welcome

OK @martipello, I’ve had a play but I’m not sure if this is 100% what you are after, but give it a go anyway. You will notice I have used different methods altogether and have also changed some variables from public to local. I created a new package from scratch so if you want to see what this does by itself, let me know and I’ll simply add the package in.

using UnityEngine;
using System.Collections;

public class Move : MonoBehaviour {

    public float rotateSpeed = 0.1f;
    public float speed = 0.1f;
    public float jumpSpeed = 6.0f;
    public float maxDistance = 1.0f;

    float distToGround;
    float journeyDistance;
    float startTime;
    bool isGrounded = false;
    bool doMovement = false;
    Vector3 startPoint;
    Vector3 endPoint;
    Rigidbody rb;
    Transform sonicDroid;

    void Awake() {
        sonicDroid = transform;
        rb = GetComponent<Rigidbody>();
    }

    void Start() {
        startPoint = sonicDroid.position;
        endPoint = startPoint;
        startTime = Time.time;
        rb.AddForce(1, 1, 1);
        journeyDistance = Vector3.Distance(startPoint, endPoint);
    }

    void Update() {
        if(isGrounded) {
            if(Input.GetKeyDown("space")) {
                doMovement = false;
                isGrounded = false;
                rb.velocity = Vector3.up * jumpSpeed;
            } else if(doMovement) {
                if(Input.GetKey("a")) {
                    sonicDroid.Rotate(new Vector3(0, 90 * rotateSpeed, 0));
                } else if(Input.GetKey("d")) {
                    sonicDroid.Rotate(new Vector3(0, -90 * rotateSpeed, 0));
                }
                float distanceMoved = (Time.time - startTime) * speed;
                float journeyFraction = distanceMoved / journeyDistance;
                sonicDroid.position = Vector3.Lerp(startPoint, endPoint, journeyFraction);
                float distance = Vector3.Distance(sonicDroid.position, endPoint);
                if(distance < maxDistance) {
                    Debug.Log("distance:" + distance);
                    startPoint = sonicDroid.position;
                    endPoint += (sonicDroid.forward * speed);
                } else {
                    Debug.Log("distance:" + distance);
                }
            }
        }
    }

    void OnCollisionEnter(Collision collision) {
        if(!isGrounded && collision.collider.name.ToLower() == "floor") {
            isGrounded = true;
            doMovement = isGrounded;
            if(isGrounded) {
                startPoint = sonicDroid.position;
                endPoint = startPoint + (sonicDroid.forward * speed);
            }
        }
    }
}