What about a time-based function which calculates a sinus-waveform?
Woah, sorry I'm lost. I'm not too hot on the maths stuff, is it possible you can explain it in simpler terms?
this is one common way to do it. in fact, it might qualify as a "game design pattern" ! <g>.
a simple example:
lets say your jellyfish's position is given by x,y,z.
then you have a frame counter, or timer, that increments over time, giving you an elapsed time value et.
to make the jellyfish "float", you calculate the jellyfish's final position as:
x_final = x+sin(et)
y_final = y+sin(et)
z_final = z+sin(et)
to mix it up a bit, in some of the formulas you can use cos() instead of sin(), you can multiply et by a constant, and/or multiply sin(et) or cos(et) by a constant.
sin() and cos() will be 1/4 cycle out of phase with each other. multiplying ET by a constant will shift the phase of the wave. multiplying sin(et) or cos(et) by a constant will change the amplitude of the floating action (change how far it moves back and forth).
you'll probably want to multiply sin(et) or cos(et) by the same or similar values, so it floats about the same amount in all directions.
mixing it up a bit you might end up with something like:
x_final = x + c1 * sin(et * c2)
y_final = y + c1 * cos(et * c3)
z_final = z + c1 * sin(et * c4)
where c1 through c4 are constants whose values are determined by experimentation.