Strange HumanoidRootPart Offsetting Behavior


I’m attempting to reposition the HumanoidRootPart of the dummy so that it’s further behind the model than it’s torso, effectively offsetting the point used for moving the model with MoveTo methods. In the video, I demonstrate the intended effect, but at 16 seconds, when I stop moving and let the target reach me, the position of its HumanoidRootPart resets to the dummy’s center.

The dummy used in the video is a default R15 rig, and this is how I temporarily adjust the HumanoidRootPart’s position/offset up until it reaches it’s target (Which is where I seek a solution)

Model["LowerTorso"]["Root"].C0 *= CFrame.new(0, 0, -3)

Perhaps I can void what I’m doing altogether if there is a better method to what I am trying to achieve.
p.s. Am I going to need to remove all of the welds, and re-rig it myself with the hrp in a different location?

2 Likes

Instead of making the runtime modification to the Root Motor6d C0, try moving the RootRigAttachments that are children of the HumanoidRootPart and LowerTorso at authoring time, so that the offset you want is there from the get go. If you manipulate C0/C1 values at runtime, it’s possible something is re-rigging the character and recreating the motors from the original attachments, undoing your modification. Attachments can also have value objects ‘OriginalPosition’, for example, that can overwrite the Attachment CFrame values, so if you have those value objects under the rig attachments in your NPC’s Model, you should either delete them or make sure the values match where you actually want the attachments to be (not where they used to be).

In your specific example, I think you’d just have to make HumanoidRootPart->RootRigAttachment have a position of 0,3,0, keeping the rotation of the Root joint pivoting around the character’s position, not the HRPs. This make the change end up at Root.C0, like you currently have.

1 Like

I follow. I think, Here is what I’m doing now:

Model["HumanoidRootPart"]["RootRigAttachment"].OriginalPosition.Value = Vector3.new(0, 0, 3)
Model["HumanoidRootPart"]["RootRigAttachment"].Position = Vector3.new(0, 0, 3)

Which in fact does reposition the attachments correctly, but it’s not like the HumanoidRootPart is being repositioned with them?

1 Like

Ok this provides the desired effect:

Model["LowerTorso"]["Root"].C0 *= CFrame.new(0, 0, -3)
Model["HumanoidRootPart"]["RootRigAttachment"].OriginalPosition.Value = Vector3.new(0, 0, -3)
Model["HumanoidRootPart"]["RootRigAttachment"].Position = Vector3.new(0, 0, -3)

Thank you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.