unity raycast ray code example Example: create ray unity Ray ray = new Ray(transform.position, transform.forward);