actor going side to side

Does Anyone know how I can make an actor go side to side in a linear way, like a specific place to a specific place

Answers

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited October 2013
    You could use interpolate and make a simple loop.

    If position X=100 interpolate to 400 and if position X=400 interpolate to 100.

    I always use equals or greater than for the 400 and equals or less than for 100 just incase it misses a beat.

    Project attached.

    Darren.
  • SocksSocks London, UK.Member Posts: 12,822
    If you want the actor to 'dampen' into it's left and right position (so it doesn't jerk when it changes direction) you can use this:

    Constrain self position X to: 200*cos( game.Time *200)+ 284
  • SocksSocks London, UK.Member Posts: 12,822
    Like this . . . .

Sign In or Register to comment.