Odd Move To / Interpolate results

LoneTreeInteractiveLoneTreeInteractive Member Posts: 16
edited November -1 in Working with GS (Mac)
Hi everyone,

I've been working on a tap-to-move action game where the main character flies to location you touch to avoid enemies, attack, etc.

It works beautifully 95-99% of the time but occasionally the main actor will instantly "teleport" to the touched location instead of fly to it.

I've tried several different approaches. First was to use a "Move To game.Mouse.PositionX / Y" with "Run to Completion" checked. Another time I set up real game.attributes and used "Change Attribute" to update the "Touch X / Y" coordinates whenever a new location was touched. Then I would move the character to that location when "self.Position.X / Y =/= Game.Touch X / Y".

I've even tried exchanging the "Move To" behaviors with "Interpolate" (and then used a magnitude to determine the duration of the move time) but still had the occasional glitch.

The problem seems to occur most often when the game is receiving several touches in quick succession. Anyone have any ideas? I know this is a lengthly description but any help is appreciated.

Thanks!

Brandon

Lone Tree Interactive

Comments

  • I have considered that. I was hoping to give the players the option to pick a new location mid-trajectory in case they need to avoid an enemy last minute. I think I'd rather go with your method rather than have glitchy movement though.

    I'll give it a shot. Thanks!
Sign In or Register to comment.