public AxisMouseRotationSettingsView(AxisMouseRotationSettings settings) { _settings = settings; ToggleVisibilityBeforeRender = true; IndentContent = true; }
private void RotateObjectAroundAxis() { AxisMouseRotationSettings axisMouseRotationSettings = _mouseRotationSettings.XAxisRotationSettings; if (_rotationAxis == TransformAxis.Y) { axisMouseRotationSettings = _mouseRotationSettings.YAxisRotationSettings; } else if (_rotationAxis == TransformAxis.Z) { axisMouseRotationSettings = _mouseRotationSettings.ZAxisRotationSettings; } float rotationAmountInDegrees = MouseCursor.Instance.OffsetSinceLastMouseMove.x * axisMouseRotationSettings.MouseSensitivity; Vector3 rotationAxis = TransformAxes.GetVector(_rotationAxis, TransformSpace.Global, _gameObjectTransform); RotateObjectAroundAxis(rotationAxis, rotationAmountInDegrees); }