I’ve done the initial spider construction. Check out the video demo below.
The effect is very good, isn’t it? I’m going to add an idle animation to the spider next.
I want the spider’s body to float up and down vertically, and also have a rotation on the x-axis. Preferably the x and z axes are also slightly shifted.
It should be noted that this is not a keyframe-driven animation, but an idle animation completely implemented by code.

The principle is very simple, I make the rotation angle of the spider equal to a sine function (the parameter of the sine function is an increasing time).
And I can use a float to multiply the sine function to control the range of the wave.
The same method can be used not only for rotation, but also for displacement using a sine function to achieve a wave effect.
However, the spider’s legs should not remain in contact with the ground. I need to add an idle animation to the spider legs as well.
Well, now it is the full version of the spider idle state.
Tomorrow I will start working on the attacking event of the spider (to player).