I have a big issue with this part of Code:
// Controlling
// The Input.GetKey is only for testing!
if (Input.GetKey(KeyCode.B))
{
Vector3 dir = transform.TransformDirection(Vector3.forward).normalized * calculateCurrSpeed();
//dir = transform.TransformDirection(dir);
//dir.y -= getFallConstant();
Debug.Log("Direction " + dir);
Debug.DrawRay(transform.position, dir, Color.red);
if(Input.GetKey(KeyCode.V))
characterController.Move(dir * Time.deltaTime);
}
So take a look at the Problem:
The red line show the Direction of the Vector “dir” but it move’s in the direction of the Blue one? And always only along the x Axis, also if i Rotate the Object!