コード例 #1
0
        public override void Report(WebInterface.ACTION_BUTTON buttonId, Ray ray, HitInfo hit)
        {
            if (!enabled || !IsVisible())
            {
                return;
            }

            Model pointerEventModel = this.model as Model;

            if (pointerEventModel == null)
            {
                return;
            }

            bool validButton = pointerEventModel.button == "ANY" || buttonId.ToString() == pointerEventModel.button;

            if (IsAtHoverDistance(hit.distance) && validButton)
            {
                string meshName = pointerEventHandler.GetMeshName(hit.collider);
                WebInterface.ReportOnPointerUpEvent(buttonId, scene.sceneData.id, pointerEventModel.uuid, entity.entityId, meshName, ray, hit.point, hit.normal, hit.distance);
            }
        }