Hello , im Creating a Voxel game and if i place two blocks beside one another and destroy them The raycast seems to go through the first collider and hit the one behind it also? im not too sure what im doing wrong but hears my code Hopefully someone can give me some tips or help me fix it! - thanks ![]()
if (Input.GetMouseButtonDown(0) && Inventopen != true) {
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
if (TriggerCollider.Raycast(ray, out hit, 4.0F)){
Debug.Log ("HitBlock");
}
}