Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sin, cos = math.sin, math.cos;
- function rotCFrameY(cf, theta)
- local s, c = sin(theta), cos(theta);
- local x, y, z, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components();
- return CFrame.new(x, y, z,
- m00*c+m20*s, m01*c+m21*s, m02*c+m22*s,
- m10, m11, m21,
- -m00*s+m20*c, -m01*s+m21*c, -m02*s+m22*c
- );
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement