Esempio n. 1
0
 public static void AlignObjectAxis(GameObject gameObject, AxisAlignmentSettings adjustmentSettings, Vector3 destinationAxis)
 {
     if (adjustmentSettings.IsEnabled)
     {
         Transform objectTransform = gameObject.transform;
         objectTransform.rotation = CalculateRotationQuaternionForAxisAlignment(objectTransform.rotation, adjustmentSettings.AlignmentAxis, destinationAxis);
     }
 }
        public AxisAlignmentSettingsView(AxisAlignmentSettings settings)
        {
            _settings = settings;

            ToggleVisibilityBeforeRender = true;
            VisibilityToggleLabel        = "Axis Alignment";
            IndentContent = true;
        }
Esempio n. 3
0
        private void AlignPlacementGuideAxisWithStrokeSurfaceNormalIfNecessary()
        {
            AxisAlignmentSettings surfaceAlignmentSettings = DecorPaintObjectPlacementSettings.Get().SingleDecorPaintModeSettings.PlacementGuideSurfaceAlignmentSettings;

            AxisAlignment.AlignObjectAxis(ObjectPlacementGuide.SceneObject, surfaceAlignmentSettings, StrokeSurfacePlane.normal);
        }