Esempio n. 1
0
    public GameObject objectAimedAt()
    {
        RaycastHit hit;
        Vector3    origin    = character.getItemAimPosition();
        Vector3    direction = character.getItemAimDirection();

        if (Physics.Raycast(origin, direction, out hit, sightRadius))
        {
            return(hit.collider.gameObject);
        }

        return(null);
    }