Made it so the ragdoll duplicates on death. It runs very well. Thank you Roblox.
If this is released without a fix for the interpolation, I have found a hacky solution for the interpolation which uses a RopeConstraint
with an anchored part connected to a part of the rig that uses physics.
script example
-- service
local Players = game:GetService("Players")
-- PreferedPartName(/Physics part)
local PREFERED_PART_NAME: string = "Torso" -- "Torso" works with R6 so *assumption* is that "LowerTorso" works with R15.
-- RopePart & RopeAttachment
local RopePart = Instance.new("Part") do
RopePart.Transparency = 1
RopePart.Anchored = true
end
local RopeAttachment = Instance.new("Attachment") do
RopeAttachment.Parent = RopePart
end
RopeAttachment.Parent = RopePart
RopePart.Parent = workspace.Terrain -- is this a good place to hide this?
-- functions
function PlayerAdded(player: Player)
player.CharacterAdded:Connect(CharacterAdded)
end
function CharacterAdded(character: Model?)
if character then
local preferedPart = character:FindFirstChild(PREFERED_PART_NAME)
if preferedPart and preferedPart:IsA("BasePart") then
local myAttachment = Instance.new("Attachment") do
myAttachment.Name = "RopeAttachment"
end
myAttachment.Parent = preferedPart
local myRope = Instance.new("RopeConstraint") do
myRope.Length = math.huge
myRope.Attachment0 = RopeAttachment
myRope.Attachment1 = myAttachment
end
myRope.Parent = character
end
end
end
-- events
Players.PlayerAdded:Connect(PlayerAdded)
-- init
for _, player: Player in Players:GetPlayers() do
CharacterAdded(player.Character)
player.CharacterAdded:Connect(CharacterAdded)
end
If your Root → Torso AnimationConstraint
has IsKinematic
set to false
then it should also have good interpolation but that causes physics issues and a lot of jank.
Edit:
This rope fix will cause other issues.
Another odd thing unrelated to the rope fix is that I’ve noticed is that without a BallSocketConstraint
, the limbs may lag behind on the Y position when going up steps.
video
What problem with interpolation are you talking about?
I probably should have worded that better. I meant that it would make the interpolation appear smooth. My problem with interpolation is how it currently works by default, which is really choppy between clients. However, you mentioned that there should be an official solution for it sometime.
R15: Current
I wasn’t able to get my hacky rope solution to work on R15.
Left is a player and the right is the local player.
Custom Rig(R7): Current and Rope fix
I was just providing a really hacky solution in case this gets released without the official fix.
when will this be enabled on games?
from my benchmarks, motor6ds are around 50% faster than animation constraints when IsKinematic is set to true if your manually updating the transform property. is there a reason for this?
it’s because the roblox avatar loads with the animationconstraints, but motor6ds are already defined in the startercharacter
to be more clear, the system does not replace joints, it only loads new joints into avatars