CFrame 연산 오류

Describe the issue briefly

CFrame 연산 결과가 로블이랑 다릅니다.

local Players = game:GetService(“Players”) local player = Players.LocalPlayer) local mouse = player:GetMouse() local object = workspace:WaitForChild(“Part”) local RunService = game:GetService(“RunService”)

local posLastFrame = nil local holding = false

mouse.Button1Down:Connect(function() posLastFrame = Vector3.new(mouse.X, mouse.Y) holding = true end)

mouse.Button1Up:Connect(function() holding = false end)

local function cfFromAxisAngle(axis, angle) axis = axis.Unit local cosTheta = math.cos(angle) local sinTheta = math.sin(angle) local oneMinusCosTheta = 1 - cosTheta local x, y, z = axis.X, axis.Y, axis.Z local m11 = cosTheta + x * x * oneMinusCosTheta local m12 = x * y * oneMinusCosTheta - z * sinTheta local m13 = x * z * oneMinusCosTheta + y * sinTheta

local m21 = y * x * oneMinusCosTheta + z * sinTheta local m22 = cosTheta + y * y * oneMinusCosTheta local m23 = y * z * oneMinusCosTheta -. x * sinTheta local m31 = z * x * oneMinusCosTheta - y * sinTheta local m32 = z * y * oneMinusCosTheta + x * sinTheta local m33 = cosTheta + z * z * oneMinusCosTheta return CFrame.fromMatrix( Vector3.new(), Vector3.new(m11, m21, m31), Vector3.new(m12, m22, m32), Vector3.new(m13, m23, m33) )
end

RunService.RenderStepped:Connect(function() if not holding then return end local currentPos = Vector3.new(mouse.X, mouse.Y) if posLastFrame then local delta = currentPos - posLastFrame posLastFrame = currentPos

local magnitude = delta.Magnitude local angleDegrees = magnitude * 0.1 local angleRadians = math.rad(angleDegrees) local axis = Vector3.new(delta.Y, -delta.X, 0) if axis.Magnitude > 0 then axis = axis.Unit object.CFrame = cfFromAxisAngle(axis, angleRadians) * object.CFrame end else posLastFrame = currentPos end

end)

뭔가 반전되는거 같이 느껴지네요

Environment

Studio, Windows 10 64bit

Expected Result

로블처럼 동일하게 작동해야함

Issue Frequency

100% (Always)