How to Script "octopus swimming" movement?

I have an 3D octopus with movement animation that looks great: the body slightly coils as the legs spread out, and then the octopus thrusts forward as the legs come together. But this presents a problem in that the movement in unity should not be continuous; that is, the octupus movement should be: thrusts forward and then stops, thrusts forward and then stops, thrust forward and then stops, etc. which should be in timing with the animation.

I can make the model move at a set speed but I want to know how to incrementally move as I described above: move and then stop for a split second, move and then stop for a split second, etc.

I’m still interested in how this could be scripted, however the easy work-around was to included the desired translation-movement into the animation.

Does the gameobject have a rigidbody? Are you using AddForce to move the octopus? In that case, try using ForceMode.Impulse. And use AddForce once every X seconds, synchronized with the octopus animation. And add some Drag to the rigidbody, that way it will automatically decrease the speed after every impulse.

If you are not using physics, then you will need to simulate the acceleration and drag by yourself. It’s possible, but, unless you have a good reason, it’s better to use a rigidbody.