A quick test of procedural animation in Unity, inspired by "Step by Step" Procedural Animation - YouTube.
The spider model can be obtained from the YouTube link.
-
Add Animation Rigging package to your project, and set up a two-bone IK constraint for each foot of your model. The exact process is described in the first half of Procedural Animation tutorial - YouTube.
-
Drag the script to your "Spider", and link all IK targets to the script.
-
Add a Rig Transform to the "Pelvis" bone (or similar bone in your model). Drag the "Pelvis" bone to the "Pelvis Transform" parameter from the script.
-
Add a LayerMask to your environment, and set the script parameter accordingly.
-
Modify the code/parameters to suit your needs. My settings are shown below as a reference.