Beispiel #1
0
        public override void OnClick(Vector2 position, Player player)
        {
            RaycastHit2D hit = Physics2D.GetRayIntersection(player.GetCursorRay, 20f, LayerUtils.GetLayer(Layers.GRAB).Mask);

            if (hit && this.objects.Contains(hit.collider))
            {
                this.dragging = hit.collider;
                this.startPos = this.dragging.transform.position;
            }
        }