How to make a VR Climbing system

I’m trying to make a VR game where you can climb up ledges and blocks. Some people have said to use Align Positions with Reaction Force Enabled and attach it to your hands to your Torso or RootPart. However when I try that there is hardly any difference and instead the Character will just slowly follow my hands.

Here is the code I used:

local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local HumanoidRootPartAttachment = Instance.new("Attachment",HumanoidRootPart)
HumanoidRootPartAttachment.Name = "HumanoidRootPartAttachment"
local HumanoidRootPartAlignPosition = Instance.new("AlignPosition",HumanoidRootPart)
HumanoidRootPartAlignPosition.Attachment0 = HumanoidRootPartAttachment
HumanoidRootPartAlignPosition.Attachment1 = CollidableLeftHandAttachment
HumanoidRootPartAlignPosition.ReactionForceEnabled = true
HumanoidRootPartAlignPosition.Responsiveness = 10

RunService.RenderStepped:Connect(function()
	local LeftHandCFrame,RightHandCFrame = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand),VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
	TrueLeftHand.CFrame = CurrentCamera.CFrame * (CFrame.new(LeftHandCFrame.Position * HeadScale)) * CFrame.fromEulerAnglesXYZ(LeftHandCFrame:ToEulerAnglesXYZ())
	TrueRightHand.CFrame = CurrentCamera.CFrame * (CFrame.new(RightHandCFrame.Position * HeadScale)) * CFrame.fromEulerAnglesXYZ(RightHandCFrame:ToEulerAnglesXYZ())
end)

And here is a video:


If anyone could help me that would be great!

1 Like

One possibility,

Adding constraints like a weld or rope to the hands and setting Attachment1 to the point of contact. But then your CFrame would be wonky, so I guess you could inhibit CFraming while it’s attached.

There’s also BodyForces, I use BodyGyro to keep objects projected in the air, so you could probably do something similar, but you’d have to inhibit CFraming as well.

1 Like