Skip to content

Instantly share code, notes, and snippets.

@SigmaThetaTech
Last active October 4, 2020 23:40
Show Gist options
  • Save SigmaThetaTech/f894880871e18b64630e20382107d88d to your computer and use it in GitHub Desktop.
Save SigmaThetaTech/f894880871e18b64630e20382107d88d to your computer and use it in GitHub Desktop.
Takes in a CFrame datatype in Roblox and prints it such that you can see it in pretty matrix format.
function printCFrameMatrix(cframe)
assert(typeof(cframe) == "CFrame", "CFrame Matrix Printer requires a CFrame data type. Got "..typeof(cframe))
print("Position:", cframe.X, cframe.Y, cframe.Z)
print("CFrame Matrix:")
print("XVector", cframe.XVector)
print("YVector", cframe.YVector)
print("ZVector", cframe.ZVector)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment