Tell me why you do not write to the console that you got. here is the `void Update () {script

if (kill.EnemyIsDead == false) { if (hello.stadia == 1) { transform.LookAt(target); Ray ray = new Ray(transform.position, transform.forward);//создаем луч первый параметр -откуда будет испускаться ,луч 2- куда RaycastHit hit;//сталкнулся ли обьект if (Physics.Raycast(ray, out hit )) { if (hit.collider.name == "personaj") { Debug.Log("попал"); } else if (hit.collider.tag == "Untagged") { } } }}` 
  • I strongly advise you to learn how to debug the application. Put the stopping points in the right places and see what the check fails and why ... - EvgeniyZ
  • @ The fact is that I almost always get what I’ve missed, and only sometimes it shows what I ’ve got - danchikon 10 danchikon10
  • @EvgeniyZ is higher !! 1 - danchikon 10 danchikon10 1:58 pm
  • After racast put Debug.Log (hit.collider.name); and look where you got the beam. - MikeL

0