Exemple #1
0
        override public Capture UpdateCapture(InputState input, CaptureData data)
        {
            BaseSurfacePointTool tool =
                (context.ToolManager.ActiveRightTool as BaseSurfacePointTool);

            if (Released(input))
            {
                tool.End();
                return(Capture.End);
            }
            else
            {
                SORayHit rayHit;
                bool     bHit = targetSO.FindRayIntersection(WorldRay(input), out rayHit);
                if (bHit)
                {
                    tool.Update(ClickPoint(input), WorldRay(input));
                }
                return(Capture.Continue);
            }
        }
Exemple #2
0
        override public Capture UpdateCapture(InputState input, CaptureData data)
        {
            BaseSurfacePointTool tool = context.ToolManager.GetActiveTool((int)data.which) as BaseSurfacePointTool;
            Ray3f worldRay            = (data.which == CaptureSide.Left) ? input.vLeftSpatialWorldRay : input.vRightSpatialWorldRay;
            bool  bReleased           = (data.which == CaptureSide.Left) ? input.bLeftTriggerReleased : input.bRightTriggerReleased;

            if (bReleased)
            {
                tool.End();
                return(Capture.End);
            }
            else
            {
                SORayHit rayHit;
                bool     bHit = targetSO.FindRayIntersection(worldRay, out rayHit);
                if (bHit)
                {
                    tool.Update(Vector2d.Zero, worldRay);
                }
                return(Capture.Continue);
            }
        }