public void CalculateRotationHints(MyBlockBuilderRotationHints hints, bool isRotating)
        {
            MyEntity entity = PreviewFloatingObjects.Count > 0 ? PreviewFloatingObjects[0] : null;

            if (entity != null)
            {
                MyCubeGrid grid = entity as MyCubeGrid;
                if (grid != null && (!grid.IsStatic || MyFakes.ENABLE_STATION_ROTATION))
                {
                    Vector3I     gridSize = grid.Max - grid.Min + new Vector3I(1, 1, 1);
                    BoundingBoxD worldBox = new BoundingBoxD(-gridSize * grid.GridSize * 0.5f, gridSize * grid.GridSize * 0.5f);

                    MatrixD mat = entity.WorldMatrix;
                    Vector3 positionToDragPointGlobal = Vector3.TransformNormal(-m_dragPointToPositionLocal, mat);
                    mat.Translation = mat.Translation + positionToDragPointGlobal;

                    hints.CalculateRotationHints(mat, worldBox, !MyHud.MinimalHud && MySandboxGame.Config.RotationHints && MyFakes.ENABLE_ROTATION_HINTS, isRotating);
                }
            }
        }
Esempio n. 2
0
 public void CalculateRotationHints(MyBlockBuilderRotationHints hints, bool isRotating)
 {
 }