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>";
}
}