Raycast going through first face of object, hitting next face?

I have a character that is always precisely grounded. Meaning it’s bottom is always exactly positioned at the top of an object. This is important, because it may be causing the problem. The problem is that my raycast goes through the top face of the cube, and hits the bottom face. I am trying to make jumping. Any help apreciated.

EDIT

Its not going through the face, i just thought it was because of the way drawray was appearing. However, its only allowing me to jump again when facing certain ways, i think the geometry of the capsule just makes it too far from the ground or something when facing certain ways. Then again, that doesnt make sense, because i set the raycast distance (for a test) to 0.25f, and it still did the same thing.

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour {

	public float speed;
	private float mouseX;
	private float mouseY;
	public float xSensitiv;
	public float ySensitiv;
	public bool canJump;
	public float jumpForce;

	void FixedUpdate () {
		Debug.DrawRay (transform.position + Vector3.down, Vector3.down, Color.red, 100);
		if (Input.GetKey (KeyCode.W))
		{
			GetComponent <Rigidbody> ().position += transform.forward * speed * Time.deltaTime;
		}
		if (Input.GetKey (KeyCode.A))
		{
			GetComponent <Rigidbody> ().position -= transform.right * speed * Time.deltaTime;
		}
		if (Input.GetKey (KeyCode.S))
		{
			GetComponent <Rigidbody> ().position -= transform.forward * speed * Time.deltaTime;
		}
		if (Input.GetKey (KeyCode.D))
		{
			GetComponent <Rigidbody> ().position += transform.right * speed * Time.deltaTime;
		}
		mouseX += Input.GetAxis ("Mouse X") * xSensitiv * Time.deltaTime;
		GetComponent <Rigidbody> ().rotation = Quaternion.Euler (0, mouseX, 0);
		mouseY -= Input.GetAxis ("Mouse Y") * ySensitiv * Time.deltaTime;
		mouseY = Mathf.Clamp (mouseY, -90l, 90);
		Camera.main.transform.localRotation = Quaternion.Euler (mouseY, 0, 0);
		if (Input.GetKey (KeyCode.Space) && canJump == true && Physics.Raycast (transform.position + Vector3.down, Vector3.down, 0.25f))
		{
			GetComponent <Rigidbody> ().velocity += Vector3.up * jumpForce;
		}
	}
}

Your raycast code isn’t really set up properly, here is an example! You can adjust the 0.5f to whatever you please, depending on your model and whatnot. Essentially what this raycast code is doing, is casting down, hitting a point, checking the location of that point, and getting the distance to that point. Then, we’re making sure that the distance to that point is less than or equal to our required distance before we reset the canJump bool.

Good luck!

	public bool canJump;
	public float jumpForce;
	public int jumpCount;
	public int maxJumpCount;
	public float distanceToGround;
	
	void FixedUpdate () {
		RaycastHit hit;
		if (Physics.Raycast (transform.position, -Vector3.up, out hit, 100.0F)) {
			distanceToGround = hit.distance;
			if(distanceToGround <= 0.5f){
				canJump = true;
				jumpCount = 0;
			}

			if (Input.GetKeyDown (KeyCode.Space) && canJump && jumpCount < maxJumpCount) {
				jumpCount ++;
				GetComponent <Rigidbody> ().velocity += Vector3.up * jumpForce;
			}
		}
	}