#Help me make these footsteps align with the ground please

1 messages · Page 1 of 1 (latest)

faint blade
#

i have never used alignorientation (instance) EVER and im not sure if there is any other way, any help is appreciated!!!

proud delta
#

that is called procedural animations btw, and I suck at it so I won't be able to help srry

shadow basin
# faint blade i have never used alignorientation (instance) EVER and im not sure if there is a...

This might help: https://youtu.be/DPpAsjUr278?si=PQZkHyvUcCup_FVx
It doesn't go very deep into scripting but it does show you how you could set up a model with ik controls (The thing you use for procedural animations).

In this video you'll learn how to easily make procedural animations in Roblox using these 4 steps. I hope you enjoy the video!


RigEdit Lite:
https://create.roblox.com/store/asset/1274343708/RigEdit-Lite

My procedural animation module: https://create.roblox.com/store/asset/17842459894/Proce...

▶ Play video
#

And this tutorial you might just want to watch to understand IK Controls a little better: https://www.youtube.com/watch?v=iWRlgOw8fW4&t=179s

Inverse kinematics is the mathematical process of calculating the variable joint parameters needed to place the end of a kinematic chain.

Become a member for great Channel and Discord perks!: https://www.youtube.com/channel/UCmIFjYx2aXrTjy5H8Zz1IfA/join
Discord Server: https://discord.gg/Fk8CF67RE7

If the invite doesn't work, try it from here:...

▶ Play video
faint blade
#

no no, i just want the footstep parts to be aligned with the ground

shadow basin
faint blade
#

rotation-wise?

shadow basin
#

Or Ig if you don't want it to be that precise you could probably also rotate the character

faint blade
#

no no i mean the footstep parts, not the actual legs

shadow basin
faint blade
#

no no

#

watch the video

#

the footstep parts

#

the trail

final jetty
#
local characterPosition = humanoidRootPart.Position

            local raycastParams = RaycastParams.new()
            raycastParams.FilterDescendantsInstances = {character, footstepPart}
            raycastParams.FilterType = Enum.RaycastFilterType.Exclude

            local rayOrigin = characterPosition - Vector3.new(0, 1, 0)
            local rayDirection = Vector3.new(0, -100, 0)

            local raycastResult = workspace:Raycast(rayOrigin, rayDirection, raycastParams)

            if raycastResult then
                local groundY = raycastResult.Position.Y
                local feetY = characterPosition.Y - 2.8

                local finalY = math.min(groundY, feetY)
                local finalPosition = Vector3.new(characterPosition.X, finalY, characterPosition.Z)

                local surfaceNormal = raycastResult.Normal
                local upVector = Vector3.new(0, 1, 0)

                local rightVector = upVector:Cross(surfaceNormal)
                if rightVector.Magnitude < 0.001 then
                    rightVector = Vector3.new(1, 0, 0)
                else
                    rightVector = rightVector.Unit
                end
                local backVector = surfaceNormal:Cross(rightVector).Unit

                footstepPart.CFrame = CFrame.fromMatrix(
                    finalPosition,
                    rightVector,
                    surfaceNormal,
                    -backVector
                )
            else

                local fallbackPosition = Vector3.new(characterPosition.X, characterPosition.Y - 3, characterPosition.Z)
                footstepPart.CFrame = CFrame.new(fallbackPosition)
            end
#

simple raycast to align it with the surface

#

obviously tweak it to how your game is but thats really all you need

dull creek
fathom abyss
fathom abyss
proud delta
final jetty
faint blade
#

I don’t really need to send a script I just needed to find a solution

#

just needed guidance