playMaker

Author Topic: Move Towards oddness  (Read 3175 times)

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Move Towards oddness
« on: October 04, 2012, 09:20:57 PM »
Hiya,

I'm using the Move Towards action to translate objects across a background.  When the objects reach their target they reset to their origin point and (are supposed to) begin translating back to the target again.  The purpose is to create the illusion of a continuously scrolling background while recycling a small number of objects.

The problem I'm having is that when the objects reach their target and move back to their origin, they don't begin moving toward their specified target in the Move Towards action. 

The setup has 3 states, only two of which repeat:
state: init - (gets the start and finish positions, this state does not repeat)
state: move - (moves towards the target object.  when reached -> transition to state: reset)
state: reset - (Set Position to the origin point -> transition to state: move)

Any ideas?

Thanks as always!




kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: Move Towards oddness
« Reply #1 on: October 05, 2012, 04:58:20 AM »
not sure why this is but have you tried a forced reset after a certain time (if you know how long the object takes) with a send event?
Or if the move towards action is becomes inactive, can't you use the FINISHED event instead of "continue"?
Best,
Sven

artician

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 318
Re: Move Towards oddness
« Reply #2 on: October 05, 2012, 09:27:41 AM »
Yeah I did try that.  I had the "reset" state move directly back to the "init" state before continuing on, just to refresh the whole FSM, but it didn't change a thing.  I was thinking it could be a bug with the action.

I ended up just having my objects just move to a specific X value in world space, and then jump back to it's origin and repeat, and that worked well enough.

Thanks for the reply!