In my game, I’m using R15 rigs for the enemy NPC’s. However, I scaled the models up a bit and am getting this issue.
You have to change the property called “HipHeight” inside of the humanoid.
Alright I’ve found a function that re-calculate’s the humanoid’s HipHeight, but it’s still not working properly
function CalculateHipHeight(character)
local bottomOfHumanoidRootPart = character.HumanoidRootPart.Position.Y - (1/2 * character.HumanoidRootPart.Size.Y)
local bottomOfFoot = character.LeftFoot.Position.Y - (1/2 * character.LeftFoot.Size.Y)
local newHipHeight = bottomOfHumanoidRootPart - bottomOfFoot
return newHipHeight
end
It is working though, your math is incorrect, that’s why it’s not on the ground. Why not set it manually?
Looks like you are setting the HipHeight too high. Try manually adjusting it yourself until you find the perfect value, instead of doing it with scripts.
Also from what I can tell looking at the video you provided, it looks like the npc is one foot off the ground, perhaps if you really wanna adjust the height automatically, change your script to this
function CalculateHipHeight(character)
local bottomOfHumanoidRootPart = character.HumanoidRootPart.Position.Y - (character.HumanoidRootPart.Size.Y / 2)
local bottomOfFoot = character.LeftFoot.Position.Y - (character.LeftFoot.Size.Y)
local newHipHeight = bottomOfHumanoidRootPart - bottomOfFoot
return newHipHeight
end
I’ve tried adjusting the HipHeight to 3 which seems to make it completely level to the ground, however the feet are not “planted”. The higher the HipHeight is is the more planted the feet/legs are. The animation I’m using is the “werewolf” idle animation from Roblox’ official werewolf animation pack, and the feet are completely planted on a normal sized rig.
I believe it does this on actual players too, you just do not notice it because of how miniscule it is on a normal size model. I would just adjust the parameters until it feels correct. If it must be perfect, you can always make your own animations on a rig of this scale.
Yeah that’s the issue, there’s different sized mobs but they are all using the same animations. Guess I’ll just have to make a new animation.
You should probably mark a solution to this post, since it seems like you’ve accepted an answer.
Legs by default have no collision with most objects, they are just a raytrace from the HumanoidRootPart. Change the HipHeight to the height in studs from the ground to the HumanoidRootPart. Below is the equation provided by the official documentation for R15 rigs.
Height = (0.5 * RootPart.Size.Y) + HipHeight