Exemplo n.º 1
0
        public override void UpdateHover(InputState input)
        {
            ToolSide eSide     = context.ToolManager.FindSide(tool);
            Frame3f  sideHandF = (eSide == ToolSide.Left) ? input.LeftHandFrame : input.RightHandFrame;

            sideHandF.Origin += SceneGraphConfig.VRHandTipOffset * sideHandF.Z;
            //update_last_hit(tool, input.vMouseWorldRay);
            tool.UpdateBrushPreview(sideHandF, lastHitTID);

            Vector2f vStick = (eSide == ToolSide.Left) ? input.vLeftStickDelta2D : input.vRightStickDelta2D;

            if (Math.Abs(vStick[1]) > 0.5f)
            {
                tool.Radius.Add(fDimension.World(vStick[1] * resize_speed(ref input)));
            }

            // cycle brush on press+left/right
            //bool stick_up = (eSide == ToolSide.Left) ? input.bLeftStickReleased : input.bRightStickReleased;
            //if ( stick_up && Math.Abs(vStick[0]) > 0.9 ) {
            //    int n = (int)tool.ActiveBrush;
            //    n = MathUtil.ModuloClamp(n + (vStick[0] < 0 ? -1 : 1), 2);
            //    tool.ActiveBrush = (SurfaceBrushTool.BrushTool)n;
            //}
        }
Exemplo n.º 2
0
 public override void UpdateHover(InputState input)
 {
     update_last_hit(tool, WorldRay(ref input));
     tool.UpdateBrushPreview(lastHitFrameW, lastHitTID);
 }