Physics and Mesh Collider

Hi guys i’m testing a raycasthhit and they dont detect this model but all other’s models detect. why?

using UnityEngine;
using UnityEngine.UI;

public class test : MonoBehaviour {

    public bool isGrounded;
    public float Rango = 2.5f;
    public Text text;

    // Update is called once per frame
    void FixedUpdate () {

        Vector3 fwd = this.gameObject.transform.TransformDirection(-Vector3.up);
        RaycastHit raycastHit;
        isGrounded = Physics.Raycast(transform.position, fwd, out raycastHit, Rango);
        Debug.DrawLine (transform.position, raycastHit.point,Color.red);

        if (isGrounded)
            text.text = "Detectando colision de nombre(<color=red>" + raycastHit.collider.name.ToString () + "</color>)";
        else
            text.text = "<color=red>NO</color>";
    }
}

Uppp

Hi, if your object scale is let say 25 go to your mesh import setting and set the scale factor to 25, then go back to your object transform settings and set the scale to 1,1,1, and then it should work.

yeah but that is crazy if i change the scale they dont detect raycast. so bad

That’s true, lets hope they’ll fix this in the futur version of unity.

thanks for reply.