'C0' is where an imaginary offset point is placed relative to 'Part0'.
'C1' is how 'Part1' is attached to that offset point, angle and all.
Welds
If you're animating the typical actor (two arms, a torso, a couple of legs, and a head) you should try using ROBLOX's animation plugin or Davidii's(or was it Daviidi) expansion of it, but if you're serious on making custom 'frames' (which could be useful for actors that aren't the typical character) then you'd have to make a table or list of every joint's desired weld CFrames per frame. At least, this is how I would try it. I've never used CFrame to animate as it seems beyond tedious to me. This being the case, I'll leave my code abstract for your interpretation.
N = FIND MY NECK!
RH = FIND MY RIGHT HIP!
LH = FIND MY LEFT HIP!
RH = FIND MY RIGHT SHOULDER!
LH = FIND MY LEFT SHOULDER!
tN = {
Neck CFrame in frame 1,
Neck CFrame in frame 2
}
tLH = {
Left Hip CFrame in frame 1,
Left Hip CFrame in frame 2
}
tRH = {
Right Hip CFrame in frame 1,
Right Hip CFrame in frame 2
}
tLS = {
Left Shoulder CFrame in frame 1,
Left Shoulder CFrame in frame 2
}
tRS = {
Right Shoulder CFrame in frame 1,
Right Shoulder CFrame in frame 2
}
function animate(frame)
N.Weld.C1 = tN[frame]
RH.Weld.C1 = tRH[frame]
LH.Weld.C1 = tLH[frame]
RS.Weld.C1 = tRS[frame]
LS.Weld.C1 = tLS[frame]
end
framespersecond = 1
frames = #tN
while true do
for i = 1, frames do
animate(i)
wait(framespersecond)
end
end
If I made any typos or was completely useless please tell me so I can edit/remove this answer.
EDIT: tN.[frame] should've been tN[frame] fixed!
1 comment
CFrame.Angles is a much shorter name for CFrame.fromEulerAnglesXYZ btw