RigidConstraints constraining attachments that they aren't assigned to

I have a character model made and rigged in Blender, whereby it has a rigged part above it’s head where a SurfaceLight should be added. Doing so has no issues, and the character is animated as expected with the SurfaceLight acting properly as a searchlight for my character.

However, I attempted to add two Attachments to this part as well, with significant offset between one another so that I may create a Beam object between them. The only way for these Attachments and this Beam to be oriented and animated according to the orientation of the light part of my character is to use RigidConstraints to fix the offset the Attachments and the Bone of the light part. However, enabling the RigidConstraint causes the SurfaceLight as well as any other Attachment that is a child of the light part to be constrained to the bone as well, which is not what I assigned the RigidConstraint to.

Expected behavior

I expected the SurfaceLight of the light part to remain as is, unconstrained to the light part Bone, in addition to any other Attachments previously made, that are not the two Attachments that I want to use for a Beam.

Hi, could you please provide repro info - specifically a repro file and repro steps? This will help us test the bug locally and fix it quicker. Thank you!

Sure, first start off by having any custom animated armature in studio, preferably one that is made of multiple parts. Then, insert a surfacelight into the mesh of the character’s head. Any other mesh of the character is fine, but the head is better for this example in my opinion. Have the direction of this light be pointed in the same direction as the character’s face is looking. After that, insert an attachment into the same mesh, and use a rigidconstraint to join this attachment and the bone for the armature’s head. The moment you do so, it is likely that the surfacelight you inserted earlier will change direction, or even be constrained to the attachment despite not being parented under it.

Now, create a new attachment under the same head mesh, with another rigidconstraint that links it to the same head bone. Create a beam between these two attachments that were inserted, and try adjusting the attachments’ position to create a light beam effect for the surfacelight.

Throughout attempting to create this lighting effect with rigidconstraints, it should be the case that the moment rigidconstraints begin to be involved that there is tremendous difficulty in adjusting the direction and position of the attachments.

Actually, I’ve come to realise there’s an even simpler way to explain the primary issue.

It is impossible to adjust the offset of attachments that are constrained together with bones via rigidconstraints

Hi, if this is still an issue, is it possible for your to provide a minimal repro file?

Apologies for the very late response, I’ve made a repro file here
RigidConstraint_Repro.rbxl (72.8 KB)

Inside is a gingerbread man skinned mesh rig. Attempt to use a RigidConstraint to position an attachment with a spotlight to the end of one of its limbs

Thanks for the repro. If I understand correctly, you want the flashlight attachment to be placed somewhere like the red circle in the image below:


If that’s the case, you’ll need to add another Bone at that location if you want to use a RigidConstraint to connect the Attachment there. RigidConstraint forces two Attachment or Bone instances to maintain a fixed, zero-offset position and orientation relative to each other. So you’ll never be able to adjust the offset of the things that are constrained together by a RigidConstraint.

I see, but when it comes to attachments under BaseParts connected to bones via rigidconstraints, I am able to offset these BaseParts albeit with some difficulty.

Additionally, I want to add that there still exists a bug where instances like the spotlight which are not a child of a rigidconstrained attachment are still forcefully constrained in that way once a rigidconstraint is applied.
In the image below the spotlight was originally facing the same direction as the character, but once the rigidconstraint is applied onto the attachment with a pointlight, with a bone, the spotlight now acts as though it is also under the attachment and points towards another direction

I see, but when it comes to attachments under BaseParts connected to bones via rigidconstraints, I am able to offset these BaseParts albeit with some difficulty.

Yes, you are offsetting the BasePart from its child Attachment. For example, if you have

Part -> Attach1 - (RigidConstraint) -> Attach2

The -> between Part and Attach1 represents the parent/child relation between them. Attach1 can be offset from Part by modifying the CFrame of Attach1, which controls its position/orientation relative to Part.

The RigidConstraint between Attach1 and Attach2 forces Attach2 to have the same position/orientation as Attach1. If you want to offset Part from Attach2, you’ll have to change Attach1.CFrame.

I want to add that there still exists a bug where instances like the spotlight which are not a child of a rigidconstrained attachment are still forcefully constrained in that way once a rigidconstraint is applied.

This is not a bug, but rather a consequence of RigidConstraint forcing its attachments/bones to have the exact same position and orientation. Specifically, it forces the CFrame of Attachment1 to be the same as the CFrame of Attachment0. Think of it as Attachment1 is forced to follow Attachment0. In your example, if you try to move/rotate LowerArm.R, it will always snap back to the position and orientation of Attachment.

I think what you’ll want to do is add a new Bone connected to LowerArm.R that is positioned and oriented the way you want SpotLight to point. You can then use a RigidConstraint to connect Attachment to this new Bone. Let me know if that works for you!