Motor6D, Motor, Transform, Difference

What is the difference between a Motor6D and Motor?

Also what is the difference between the Transform and C0 property? If they’re both getting edited for my custom animations, wouldn’t they affect each other? Also which one should I be editing for my custom animations ?

2 Likes

I believe that the only defining difference is the Transform property; I have never seen the motor joint being used for work otherwise.

Transform and C0 are very different. Transform is used internally by animations that describes a transformation for the arms, while C0 is a fixed offset from a given point. If you have custom animations, you should probably not be using the Transform property. It does not replicate and it has to be set every frame if you have other animations. It depends on what you mean by custom animations though: whether you mean math or Roblox animations is unclear.

Usually for a view model you might find yourself automatically using both in the instance that you’re using Roblox animations and CFraming the model to the camera. You’d use animations to show actions and CFrames to place the model to the camera.

C0 and Transform (and C1) are applied in a particular order such that the CFrames of Part0 and Part1 of a Motor6D satisfy this equation:

Part0.CFrame * Motor6D.C0 * Motor6D.Transform = Part1.CFrame * Motor6D.C1

It’s been stated above that Transform is used internally by the Roblox animation system to pose joints. For your custom animation system that you mentioned, you can use Motor6Ds for your joints. You can use C0 and C1 in combination to rig your characters (or objects) so that they are ready to be animated, and then set the Transform property to pose them.

Often it is useful to use attachments to visualise and specify this information at the rigging stage. There is some information on the DevHub about how Roblox does this internally with its R15 character rigs and how you can use an API exposed by the Humanoid object to do it yourself.

BuildRigFromAttachments assembles a tree of Motor6D joints for a Humanoid. Motor6D joints are required for the playback of Animations

Starting from the humanoid’s Humanoid.RootPart, the function collects all Attachments parented in the current part, whose name ends with “RigAttachment”. It then searches for a matching attachment in the character that shares the same name as the attachment.

Using those two attachments, a Motor6D joint is generated based on the parts associated with the two attachments, and the Attachment.CFrames of the attachments.
2 Likes

If I’m understanding this correctly, C0 is like a pivot point.

This transform property is just to make setting animations easier?

Also is transform necessarily more optimized than C0?