Move Player while Jumping C#

OK, so I wanted to get a straight answer how to make this work right:

using UnityEngine;
using System.Collections;

public class PlayerControl : MonoBehaviour

    public float speed = 3.0F;
    public float rotateSpeed = 3.0F;
    public float jumpSpeed = 8.0F;
    public float gravity = 20.0F;
    private Vector3 moveDirection =;

    void Update()
        CharacterController controller = GetComponent<CharacterController>();
        // This is for making certain Char is on the ground
        if (controller.isGrounded)
            //allows movement in direction facing or moving backwards.
            Vector3 forward = transform.TransformDirection(Vector3.forward);
            float curSpeed = speed * Input.GetAxis("Vertical");
            controller.SimpleMove(forward * curSpeed);

            //allows rotation on Y axis

            transform.Rotate(0, Input.GetAxis("Horizontal") * rotateSpeed, 0);

            //Jumping only going up and down and does not allow jump with movement like it should

            if (Input.GetButton("Jump"))
            moveDirection.y = jumpSpeed;
        //Applying gravity to the controller

        moveDirection.y -= gravity * Time.deltaTime;

        //Making the character move

        controller.Move(moveDirection * Time.deltaTime);

It was not explained to me that all i had to do was remove

        if (controller.isGrounded)

so i can jump with movement ad have the rotation I needed. But the problem with that is it does not function realistically to limit the obstacles it can more or less walk over. But with

 if (controller.isGrounded)

with the movement code and its detection working right, Then all i can do is jump in place.

What i need is a very simple fix that i cannot find in the scripting tutorials. I am more than certain its just some stupid little code line.

Yes, i will eventually have animations to be called with these movements. But i need to resolve this before even thinking about messing with that,

This is the jump I use. I don’t use Character controller, but you should be able to adapt this for your jumps. The trick here is the _jumped flag.

using UnityEngine;
using System.Collections;

public class PlayerControls : MonoBehaviour {

    public float jumpForce = 345f;

    private Rigidbody _rb;
    private bool _jumped = false;

    // Use this for initialization
    void Start() {
        _rb = GetComponent<Rigidbody>();
        _distToGround = GetComponent<Collider>().bounds.extents.y;

    // some other code 

    void FixedUpdate() {
        // your turn code

       // your movement code

       // Jump
        if (isGrounded()) {
            if (Input.GetButton("Jump")) {

    void jump() {
        if (!_jumped) {
            _jumped = true;
            Vector3 force = transform.up * jumpForce;
            _rb.AddRelativeForce(force, ForceMode.Impulse);
        _jumped = false;

    bool isGrounded() {
        return Physics.Raycast(transform.position, -Vector3.up, _distToGround + .1F);