circusmonkey
The simple way to do this would be to use a Sin and Cos function in the transform of your geometry object .
In the TX channel type sin($FF*6)*6 and in TY channel type cos($FF*6)*6
you will then have a looping circular motion for your sting ray
R
that crossed my mind too, but the math gets tricky. we need to be careful if we want it to loop correctly for “n” number of frames.
furthermore, if a circular and not elliptical orbit are required, the outside multiplier should be the same and therefore wouldn't creating our own variable and slider for the radius be helpful? i suppose 2 sliders could be used to allow elliptical orbits. hmmm … i've seen it in a video tutorial, but …. OK in help i found the “expression cookbook” worth a read.
RMB on the node, select Edit Paramater Interface and add a Float or Integer. rename it and remember the name! I chose Integer and named it “radius.” You can limit the range by checking “range”…
now in the translate params instead of sin($FF*6)*6 use sin($FF*6)*ch(“./radius”) make the same change for the “cos” expression.
think of houdini as an OS directory tree thingie. the expression cookbook helped me here. and, as memory slowly returned, you can drag and drop params onto other parameter textboxes. using my “radius” param, one can click and drag from the label (I used the same name “radius”) and drop it onto the param textbox you want it in. in this case translate X and translate Z. the path to the variable will be slightly different depending on whether you use Channel Ref or Relative Channel Ref.
note: you might want to stop the animation to get accurate values in your new param. sliding it while it was looping worked visually but the param didn't update. i'm on 9.0.725
now, who's up for getting the object to be tangental to the curve?
a possibly easier route and one that takes care of the tangental problem would be to translate the stingray off of the origin and then move the pivot in the opposite direction and then do a rotate on the Y axis. then the math would fade away and only $FF would need to be put in the rotate Y parameter.
peace & 42