How to make an actor move in a figure 8

maxerovmaxerov Member Posts: 9
edited November -1 in Working with GS (Mac)
I would like to make a behavior to make an actor move in a sideways figure eight (like an infinity sign). I can't figure out how to make it work smoothly. It seems like it should be simple. Does anyone have any ideas?

Comments

  • ORBZORBZ Member Posts: 1,304
    move in a circle, but then invert the radius every half revolution

    radius = sin(2*time)*100
    x = cos(time)*radius
    y = sin(time)*radius

    that should do it, haven't tested it though. May not work :)

    edit: nope, that doesn't work. It makes a pretty flower / spirograph though ;)
  • old_kipperold_kipper Member Posts: 1,420
    Orbz's version is more elegant but you can do it with interpolates as they can be used to pull curves if you pair them in 'ease in' and 'ease out' to change the x and y position.

    kipper
Sign In or Register to comment.