They are not directly stored in there. However, you could calculate them:
local function mat2RPY(matrix)
local function sqrts(a, b)
return math.sqrt(a^2 + b^2)
end
local beta = math.atan2(-matrix.r8, sqrts(matrix.r0, matrix.r4))
if beta == math.pi/2 then
return 0, beta, math.atan2(matrix.r1, matrix.r5)
elseif beta == -math.pi/2 then
return 0, beta, -math.atan2(matrix.r1, matrix.r5)
else
local cosb = math.cos(beta)
return math.atan2(matrix.r4/cosb, matrix.r1/cosb), beta, math.atan2(matrix.r9/cosb, matrix.r11/cosb)
end
end
Usage:
local alpha, beta, gamma = mat2RPY(get_body_info(player, bodypart).rot)
I think alpha is rotation around x, beta around y and gamma around z. No time to test though.