I have been trying to use inverse kinematics to move the feet of my model along complex terrain realistically, using raycasts to detect the terrain. Like the game Eg!, basically. (The target of the IK goes to the hit point of the raycast, using an attachment).
However, even when angling the raycast, it ends up being too slow, resulting in the attachment ending up beneath the model when walking, making the feet drag behind. Also, it will only detect parts right in front of it, resulting is bugs when on thin parts.
So far I have not come up with any grand ideas / solutions. Is there anything else I can try?
Why not just raycast from the torso/RootPart to two goalpoints beneath it, and angle the feet according to the normal vector of the terrain given by the raycast result?
Well, I was implying the attachments by saying “feet”
Place the attachments at their respective raycast result endpoints, and rotate them according to their normals.
Know what I’m saying?
Like, the attachment for the left foot goes to the left raycast coming down from the torso, and the right foot’s attachment goes toward the right torso raycast?
Then angle them based on the normal vector of the terrain given by the raycasts.
Ah, I see. It would rotate the feet to match the terrain underneath the body, along with adjusting the height. But how would I make them move horizontally?
Hi, I know I’m back a little late, I was intending that you’d be using the IK set up for walking you were using earlier, only changing goalpoint of the feet’s rotation using the raycast.