How to make Snake rig animation in Unreal Engine?

Snake rig for Unreal Engine. I’ve seen a lot of videos where snake rigs are made using curves in Blender. But how do I animate a snake wiggling directly in the game, without pre-defined curves? That is, so that the model can wiggle itself? I’ve only seen one video of a snake wiggling in Unreal Engine, but they used a spline for the snake to move along. I need the snake to wiggle dynamically. I had an idea to generate the spline dynamically in the game and then align the snake rig with it, but I don’t know how. Does anyone know how to rig a snake in Unreal Engine?