does Responsiveness in align orientation mean how many degrees it can turn per second
if not how would i calculate how many degrees it can turn
It is how fast it will reach the specified orientation.
Check the documentation at create.roblox.com
AlignOrientation
Responsiveness
Good question,
TL;DR it’s just the Kp term in PID responsiveness. The speed varies quite widely depending on the target orientation. However interestingly enough the time taken to reach the goal is similar.
I asked chatgpt to create a test to measure the X axis responsiveness and Y axis is the time taken to reach a goal.
local part = script.Parent -- The part you're testing
local alignOrientation = part:FindFirstChildOfClass("AlignOrientation")
local targetAttachment = alignOrientation.Attachment1
-- Goal orientation (example: rotate 90 degrees on Y axis)
local goalOrientation = CFrame.Angles(0, math.rad(90), 0)
-- Tolerance for "close enough" angle in degrees
local ANGLE_TOLERANCE = 2
-- How long to wait between tests
local WAIT_BETWEEN_TESTS = 2
-- Responsiveness values to test
local responsivenessValues = {1, 5, 10, 20, 40, 80,150,200}
-- Helper to get angle difference in degrees between two orientations
local function getAngleDifference(cf1, cf2)
local dot = cf1.LookVector:Dot(cf2.LookVector)
dot = math.clamp(dot, -1, 1)
return math.deg(math.acos(dot))
end
for _, responsiveness in ipairs(responsivenessValues) do
-- Reset part orientation
part.CFrame = CFrame.new(part.Position) -- Reset orientation to identity
wait(0.1)
alignOrientation.Responsiveness = responsiveness
-- Set new goal orientation (relative to attachment)
targetAttachment.WorldCFrame = part.CFrame * goalOrientation
local startTime = tick()
-- Wait until orientation is close enough to target
repeat
task.wait()
until getAngleDifference(part.CFrame, targetAttachment.WorldCFrame) < ANGLE_TOLERANCE
local timeTaken = tick() - startTime
print(string.format(" Responsiveness: %d | Time to reach goal: %.3f sec", responsiveness, timeTaken))
wait(WAIT_BETWEEN_TESTS)
end
Data obtained, noticed the data looked like exponential decay so I plotted it.
The x point at 1 probably does not matter since responsiveness is capped 5-200.
The orange points is when the target is changed to 180 degrees which is much faster in terms of angular velocity but still takes a similar amount of time.
Done with default align orientation settings max torque 10000 and max angular velocity infinite.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.