Hello! I think the title is self-explanatory, however I’ll explain the issue below either way.
The issue
I’m making a custom character rig without a humanoid however, I’ve came across an issue where the rig is partially inside the floor. I’ll have a picture of what I mean below if you’re still confused.
Yes, I did try to look for posts with the same issue although, all the posts either have no replies or nothing that would help. I’ve also tried using AlignPosition/BodyPosition, but it doesn’t work well with momentum.
not to my knowledge but you can create a script with a couple number values and if the hp is 0 or less then break all the welds, waits a couple seconds and loadcharacter, then use velocity for jumping etc
I’m against doing something like that but the way it’s generally done is you call workspace:Raycast(origin, direction, params).
local HRP -- humanoid root part
local params = RaycastParams.new()
-- edit params to exclude self
local result = workspace:Raycast(HRP.Position, -Vector3.yAxis * 10, params)
if result then
local bottom = result.Position + Vector3.new(0, hipheight, 0)
end
Something like this usually for each frame so you usually tie it to PreSimulation or PostSimulation.
If you don’t have a humanoid you can still use AnimationController.
I know how to get the position of the floor, the issue is how can I align the RootPart without messing up any velocity. Also I want a explanation if you can