Move To Isn't Consistent

MetzoPainoMetzoPaino Member Posts: 195
edited November -1 in Working with GS (Mac)
I'm trying to have an actor move throughout a scene with the Move To behaviour and am having some problems.

Currently I have the actor Move To a position, and then have rules along the lines of "when self.position.x = 540, then doing another Move To behaviour and having them chained together. However about 1/10 times the actor will overshoot the position, then move backwards as if correcting itself. This breaks what I am trying to do with the scene.

I can't use a combination of Velocity and Gravity because my scene will dynamically change in speed which Velocity doesn't allow.

I can't use a combination of Timers and Move behaviours because the dynamic slow-motion of the scene means that Timers will not work.

Comments

  • PhoticsPhotics Member Posts: 4,172
    Maybe you could use interpolate and calculate the duration mathematically. Also, is the movement stacked or additive? Maybe there's some other movement that's changing things.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yeah the move to behavior is known to be buggy
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    If you are worried about overshoots, then try something like 'when self.Position.X > 539'. That way it will be sure to catch 540 and everything else beyond.

    If you are concerned about having the next Move To starting exactly at 540 then you might also want to add a 'Change Attribute: self.Position.X To: 540' before you do the next Move To.
  • MetzoPainoMetzoPaino Member Posts: 195
    I wouldn't know what kind of formula would allow me to use Interpolate. Seems like I would need to figure out the duration it takes without slow mo, then perhaps add an attribute that counts how long the game is in slow mo? I don't know how to add a counter, which strangely seems like a basic thing Game Salad is missing.

    Using RThurman's advice has made a bit of progress, though it isn't full proof. If it continues to cause problems and nobody can help with the Interpolate idea I'll try adding a Change Attribute before new Move To behaviours, though I'm worried this will make the movements stilted.
Sign In or Register to comment.