absolute snapping: actually fix large world this time
This commit is contained in:
@@ -343,20 +343,10 @@ namespace FlaxEditor.Gizmo
|
|||||||
_hasAbsoluteSnapped = true;
|
_hasAbsoluteSnapped = true;
|
||||||
|
|
||||||
Vector3 currentTranslationScale = isScaling ? GetSelectedTransform(0).Scale : GetSelectedTransform(0).Translation;
|
Vector3 currentTranslationScale = isScaling ? GetSelectedTransform(0).Scale : GetSelectedTransform(0).Translation;
|
||||||
if(LargeWorlds.Enable)
|
absoluteDelta = currentTranslationScale - new Vector3(
|
||||||
{
|
(Real)Math.Round(currentTranslationScale.X / snapValue.X) * snapValue.X,
|
||||||
absoluteDelta = currentTranslationScale - new Vector3(
|
(Real)Math.Round(currentTranslationScale.Y / snapValue.Y) * snapValue.Y,
|
||||||
Double.Round(currentTranslationScale.X / snapValue.X) * snapValue.X,
|
(Real)Math.Round(currentTranslationScale.Z / snapValue.Z) * snapValue.Z);
|
||||||
Double.Round(currentTranslationScale.Y / snapValue.Y) * snapValue.Y,
|
|
||||||
Double.Round(currentTranslationScale.Z / snapValue.Z) * snapValue.Z);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
absoluteDelta = currentTranslationScale - new Vector3(
|
|
||||||
Mathf.Round(currentTranslationScale.X / snapValue.X) * snapValue.X,
|
|
||||||
Mathf.Round(currentTranslationScale.Y / snapValue.Y) * snapValue.Y,
|
|
||||||
Mathf.Round(currentTranslationScale.Z / snapValue.Z) * snapValue.Z);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delta = new Vector3(
|
delta = new Vector3(
|
||||||
|
|||||||
Reference in New Issue
Block a user