[DISCONTINUED] Free R15 IKPF System (Inverse Kinematics Procedural Footplanting)

For anyone not able to do what @GrimDarkLord7 was referring to. Here is an example of how to fix the issue. On line 163 in the IK module change the function to this.

function IK_HANDLER.UpdateRaycastBlacklist(Blacklist)	
	local FilterList = {}
	
	if Blacklist and type(Blacklist) == "table" then
		--ParamBlacklist = Blacklist
		FilterList = Blacklist
	end
	
	--local Mod = {}
	for self,_ in pairs(IK_HANDLER.ActiveInstances) do
		if self.Character then
			--table.insert(Mod, self.Character)
			table.insert(FilterList, self.Character)
		end
	end
	
	RaycastParameters.FilterDescendantsInstances = FilterList --{unpack(Mod),unpack(ParamBlacklist)}
end
6 Likes

can you guys make it R6 please

1 Like

As what iGottic said

altough i found a resource for an R6 IK but im not sure if it works now

https://www.roblox.com/games/367789063/foot-planting-for-everyone111

2 Likes

Thank you for posting this. I do have some slight issues with the footplant because its technically one more joint in the ankle. The 2 joint looks good at first but it seems a bit lacking when the foot goes inside the part. Do you know if there might be a solution as to push up the foot. It looks fine on flat plane but on stairs when one foot is elevated higher, there is a notable change as it does not take account to the foot size but only the lowerleg endpoint

image

5 Likes

So what I realized was that the hip and ground positions were derived from a variable. I pushed the points to allign with any characters height and position. I supressed the variables underneath and it seemed to be working fine for a moment. The problem now is that it seems one of the legs (left leg) are making a larger circle than the right leg even though the hip and ground positions of left and right legs are mirrored as shown in the gif.

--local RightHipCFrame = CFrame.new(0.5, -0.4, 0)--CFrame.new(0.5, -0.4, 0) -- The self.RightRotationAngle-hip reference CFrame, relative to the RightUpperLeg position
--local LeftHipCFrame = CFrame.new(-0.5, -0.4, 0) --CFrame.new(-0.5, -0.4, 0) -- The self.LeftRotationAngle-hip reference CFrame, relative to the LeftUpperLeg position
--local RightHipCFrame2 = CFrame.new(0.5,-2.7,0)
--local LeftHipCFrame2 = CFrame.new(-0.5,-2.7,0)

ezgif.com-gif-maker (8)

The second issue is to get the smooth cycles (evenly spaced out movements) shown in the post from @dthecoolest. To compare my walking cycle is speeding up at different points and slowing down at other points during the truncated circle movment. Is there a way to get evenly spaced out circular movement?

ezgif.com-gif-maker (9)

Here is what I changed in the code: This refers to the right leg, but the exact same thing was done for left leg. The change belows takes into account the character sizes of bodyparts.

before

--(RIGHT LEG)
local hip = (rootcf*RightHipCFrame).Position
local ground = (rootcf*RightHipCFrame2).Position

(RIGHT LEG)
after


local down = -rootcf.upVector
local rSY = self.HumanoidRootPart.Size.Y/2 -- half of root size y
local rSX = self.HumanoidRootPart.Size.X/2 -- half of root size x
			
			
local RightUpperLeg = self.Character.RightUpperLeg
local rootpos = Vector3.new(RightUpperLeg.Position.X,rootcf.p.y,RightUpperLeg.Position.Z)
			
local hip = (rootpos + down*rSY) 
local legsize = self.Humanoid.HipHeight
local ground = (hip + down*legsize)
3 Likes

the hands are animateable?bc im working on fps game

Im not very sure, but i believe they are animatable

im working on fe gun kit idk how to animate the rig

Well im not sure where is the rig because the resources isn’t mine, i just found it

ouh now i know it use r6 startercharacter and animate it and the character will follow

Hey, Not a clue how to script but would I be able to modify this to work with a custom body for say a creepy spider or robot walker thingy with multiple legs?
Ive seen something like this in the past with multiple legs and I wanted to recreate it however I have no clue how I would but this seems like a good place to start

2 Likes

Edit: For people asking here is the updated version:

IK_legs_updated.rbxl (40.9 KB)

So I realized clampA and ClampB were referring to the length of A and B for solving the IK. The reason for the non precise footplant was due to these being set values and not the IK formula I originally thought (Clamp A = 0.55 and ClampB = 1.15 was the set values in the module).

In order to solve this issue, I calculated the distance between the motor6dwelds. I think It would be nice to have it dynamic as the various character models existing on roblox have different hipheights and leg sizes.

Here is a before and after comparison.

Before:

Before

After: This should be scalable with any rigs I believe

After

18 Likes

There was mention of other animations being available, do you know where I can get those ?
Thanks

Thanks for this. I’ve been researching about it, but no results. I’ll give you a credit once I published the first beta of the game. Thanks Again!

i make my own but weird:
wait(1)
User = game.Players.LocalPlayer
Humanoid = User.Character.Humanoid
Torso = User.Character.Torso
L_Hip = Torso[“Left Hip”]
R_Hip = Torso[“Right Hip”]

local step = game:GetService(‘RunService’).RenderStepped;

function ArcTan(x, y)
r = math.atan(y / x)
if x < 0 then
r = r + math.pi
end
return r
end

vel = Vector3.new()
while true do
step:wait()
local velVector = Vector3.new(Torso.Velocity.X,0,Torso.Velocity.Z);
if velVector.magnitude > 0 then
m = (vel - Torso.Velocity).magnitude / Humanoid.WalkSpeed
vel = (Torso.Velocity * m + vel * 2) / (m + 2)
v = Torso.CFrame:pointToObjectSpace(vel + Torso.Position)
L_a = ArcTan(v.x, -v.z)
R_a = 3.1416 - ArcTan(v.x, v.z)
L_Hip.C1 = CFrame.new(0, 1, 0)*CFrame.Angles(0, L_a+math.pi, 0)
R_Hip.C1 = CFrame.new(0, 1, 0)*CFrame.Angles(0, R_a+math.pi, 0)
L_Hip.C0 = CFrame.new(-0.5, -1, 0)*CFrame.Angles(0, L_a-math.pi, 0)
R_Hip.C0 = CFrame.new(0.5, -1, 0)*CFrame.Angles(0, R_a-math.pi, 0)
L_Hip.MaxVelocity = Torso.Velocity.magnitude / 100
R_Hip.MaxVelocity = Torso.Velocity.magnitude / 100
else
L_Hip.C1 = CFrame.new(0, 1, 0)*CFrame.Angles(0, -1.57, 0)
R_Hip.C1 = CFrame.new(0, 1, 0)*CFrame.Angles(0, 1.57, 0)
L_Hip.C0 = CFrame.new(-0.5, -1, 0)*CFrame.Angles(0, -1.57, 0)
R_Hip.C0 = CFrame.new(0.5, -1, 0)*CFrame.Angles(0, 1.57, 0)
end
end

localscript in starterpack
it works it move when your character rotate

and i need someone can help me fix it.the script make the leg gap

5 Likes

how to make this IK works on my custom character?
hi.rbxm (51.5 KB)

1 Like

Is this meant to work with rigs that are scaled differently?

1 Like

I’m not sure, this is an old project of mine.

1 Like

Sorry if this is a dumb question, but will there be support for animation in the future? The animations I have look really strange with the foot planting.

2 Likes

It’s procedural animation, meaning it can’t overlap with existing animation.

2 Likes