Can someone provide a good explanation as to what c0 and c1 are?

I’ve looked everywhere for good explanations on this but the ones i’ve found provided really lame and vague explanations that are hard to understand. Like the devhub for instance:" C0 is the position aspect of the orientation between two parts in a weld. JointInstance.Part0 and JointInstance.Part0 move accordingly to this value, which denotes their respective positions."
What in the world does that even mean? What is jointinstance? This explanation is not beginner friendly at all.
Couldn’t find any helpful relevant yt vids on the subject. No helpful tutorials under the community resources category.
I’ve read this post and I still don’t fully understand what it is, some kind of offset from it’s part 0 position was all I got from it and it’s not sufficient knowledge to effectively use it.
Can someone please provide an indepth explanation on the c1 and c0 property and its relation to part0 and part1, relation to motor6ds, why do we even have to bother with them? A good illustration would be nice. Best explanation gets a solution.

4 Likes

Here’s an equation that describes it:

weld.Part0.CFrame * weld.C0 = weld.Part1.CFrame * weld.C1

You can solve for one of the terms by “dividing” by a CFrame, only there’s no such thing as CFrame division. Instead multiply by the inverse of the CFrame you want to “divide” by. E.g. if you want to know what CFrame Part1 ends up at, solve for that:

weld.Part1.CFrame = weld.Part0.CFrame * weld.C0  * weld.C1:inverse()
8 Likes

Think of it this way: C0 is an offset to the original position that is maintained no matter the rotation, and C1 is the same thing, but is form the attached side, hence is subtracted from C0.

1 Like

If you have 2 Parts connected together by a Motor6D then the Motor6D connects to each Part by a weld.
Weld C0 is attached to one Part, and weld C1 is attached to the other.
You can rotate the 2 Parts in relation to each other by changing the DesiredAngle Property of the Motor6D.

But if you tweak the c0, sometimes it affects the c1?

I don’t get what you mean by solve, what are we trying to solve for here in this equation? And what does the equation describe? That the c0 offset by part0’s cframe is equivalent to the c1 offset by part1’s Cframe? If you so could you provide a practical example?

i just know C0 and C1 is the cframe of something

other than that i dont know what it is either

kinda similar to a point of origin somewhere in space that you cant see

basically C0 and C1 are like object space cframe offset between 2 parts in a weld in some arbitrary point in space

well you can read the sources i found if you want

this guy does explain welds near the end but its mostly about CFrame
https://scriptinghelpers.org/questions/18619/may-someone-explain-each-line-of-this-script-especially-the-math-parts#:~:text=Welds,the%20default%20CFrame%20--%20CFrame.

1 Like

Thank you so much!
I knew what C0 and C1 were. I just needed a simple equation, so I knew what to set C0 to.
:slight_smile:

1 Like