Код: Выделить всё
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class playerCollider : MonoBehaviour
{
public float rayRange = 5;
void Update()
{
Vector3 Direction = Vector3.forward;
Ray Collider = new Ray(transform.position, transform.TransformDirection(Direction * rayRange));
Debug.DrawRay(transform.position, transform.TransformDirection(Direction * rayRange), Color.white);
}
}
он был прикреплен к игровым объектам и камере.>
Подробнее здесь: https://stackoverflow.com/questions/797 ... unctioning