Exemple #1
0
        public void Report(WebInterface.ACTION_BUTTON buttonId, Ray ray, HitInfo hit)
        {
            if (!enabled)
            {
                return;
            }

            if (ShouldReportEvent(buttonId, hit))
            {
                string meshName = null;

                if (hit.collider != null)
                {
                    meshName = eventHandler.GetMeshName(hit.collider);
                }

                WebInterface.ReportOnPointerDownEvent(
                    buttonId,
                    entity.scene.sceneData.id,
                    model.uuid,
                    entity.entityId,
                    meshName,
                    ray,
                    hit.point,
                    hit.normal,
                    hit.distance);

                eventHandler.SetFeedbackState(model.showFeedback, false, model.button, model.hoverText);
                enabled = false;

                OnPointerDownReport?.Invoke();
            }
        }