void SetupMoveAndJumpSpeed()
    {
        //Scale gravity and jump velocity to jumpHeights and timeToJumpApex
        gravity         = (2 * maxJumpHeight) / Mathf.Pow(timeToJumpApex, 2);
        maxJumpVelocity = gravity * timeToJumpApex;
        minJumpVelocity = Mathf.Sqrt(2 * gravity * minJumpHeight);

        //Scale acceleration values to the movespeed and wanted acceleration times
        acceleration  = maxMovespeed / accelerationTime;
        decceleration = maxMovespeed / deccelerationTime;

        //Set variables for the velocity scaling
        scale.SetMaxYSpeed(100);
        scale.SetMaxXSpeed(maxMovespeed);
    }