Exemplo n.º 1
0
    void DragCast()
    {
        var hit = RaycastAt(input.startingDragWorldPos);

        if (hit)
        {
            currentDraggable = hit.collider.GetComponent <IDraggable>();
        }
        else
        {
            currentDraggable = CameraControls.instance;
        }
        currentDraggable?.OnDragStart(input.startingDragScreenPos, input.startingDragWorldPos);
    }