void DrawCustomGizmo(CustomTransformGizmos customGizmo) { AxisInfo axisInfo = transformGizmo.GetAxisInfo(); customGizmo.SetAxis(axisInfo); customGizmo.SetPosition(transformGizmo.pivotPoint); }
void DrawCustomGizmo(CustomTransformGizmos customGizmo) { AxisInfo axisInfo = transformGizmo.GetAxisInfo(); customGizmo.SetAxis(axisInfo); customGizmo.SetPosition(transformGizmo.pivotPoint); Vector4 totalScaleMultiplier = Vector4.one; if (scaleBasedOnDistance) { totalScaleMultiplier.w *= (scaleMultiplier * transformGizmo.GetDistanceMultiplier()); } if (transformGizmo.transformingType == TransformType.Scale) { float totalScaleAmount = 1f + transformGizmo.totalScaleAmount; if (transformGizmo.translatingAxis == Axis.Any) { totalScaleMultiplier += (Vector4.one * totalScaleAmount); } else if (transformGizmo.translatingAxis == Axis.X) { totalScaleMultiplier.x *= totalScaleAmount; } else if (transformGizmo.translatingAxis == Axis.Y) { totalScaleMultiplier.y *= totalScaleAmount; } else if (transformGizmo.translatingAxis == Axis.Z) { totalScaleMultiplier.z *= totalScaleAmount; } } customGizmo.ScaleMultiply(totalScaleMultiplier); }