From 8f8c19b845d484f54b617205218467f38a40de20 Mon Sep 17 00:00:00 2001 From: Andrew Vu Date: Sat, 8 Nov 2025 03:40:14 -0500 Subject: [PATCH] Include orientation in CFrame formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CFrames now display both position and rotation components to properly show changes when objects are rotated, not just translated. Format: (X, Y, Z), (rotX°, rotY°, rotZ°) --- plugin/src/App/Components/PatchVisualizer/DisplayValue.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/src/App/Components/PatchVisualizer/DisplayValue.lua b/plugin/src/App/Components/PatchVisualizer/DisplayValue.lua index 0e73f75c..5b6b4de0 100644 --- a/plugin/src/App/Components/PatchVisualizer/DisplayValue.lua +++ b/plugin/src/App/Components/PatchVisualizer/DisplayValue.lua @@ -29,7 +29,10 @@ local function DisplayValue(props) text = string.format("{%s, %s}, {%s, %s}", fmtNum(x.Scale), fmtNum(x.Offset), fmtNum(y.Scale), fmtNum(y.Offset)) elseif t == "CFrame" then local p = props.value.Position - text = string.format("(%s, %s, %s)", fmtNum(p.X), fmtNum(p.Y), fmtNum(p.Z)) + local rx, ry, rz = props.value:ToOrientation() + text = string.format("(%s, %s, %s), (%s°, %s°, %s°)", + fmtNum(p.X), fmtNum(p.Y), fmtNum(p.Z), + fmtNum(math.deg(rx)), fmtNum(math.deg(ry)), fmtNum(math.deg(rz))) elseif t == "NumberRange" then text = string.format("[%s, %s]", fmtNum(props.value.Min), fmtNum(props.value.Max)) end