Move to problem - is this the commonly known bug or am I doing something wrong?

HunnenkoenigHunnenkoenig Member Posts: 1,173
edited November -1 in Working with GS (Mac)
I have an actor, which I click and it moves to a certain location.

Everything works fine, but if I set another actor on the screen and click the actor which should move to a certain location, this actor flies off the screen and doesn't stop on the given X coordinate.

Is this a bug, which was mentioned, or am I doing something wrong?

It seems, it works good for a few times and then suddenly it doesn't. I can't find anything in my rules or behaviours that could cause this.

EDIT:
Ok, never mind...it seems to work on the iPhone well.

Comments

  • JGary321JGary321 Member Posts: 1,246
    Hun - This IS actually a known bug. I removed most of my move to commands. It worked sometimes, but like you said it would overshoot a lot of the time as well.
  • synthesissynthesis Member Posts: 1,693
    I found that if your speed exceeds 250 or so...bugs start happening.
    Keep you moveTo speeds low and it works better.
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    cool, thanks!

    My speed is the standard 300 :-)
  • JackBQuickJackBQuick Member Posts: 524
    I've had problems with Move To as well. Before I found out that it was a known bug, I would get frustrated because I had difficulty replicating it -- I couldn't figure out the exact conditions where actors would fly off the screen. Good to know about the speed limit of 250 (or so).
  • jkanalakisjkanalakis Member, PRO Posts: 49
    Ugh... this speed limit is becoming a problem. On the iPhone, a speed of 250 seems reasonable. But on iPad, moving an actor across that big screen seems really slow. I need a speed of about 600, but then it misses the target about 15%-20% of the time.

    I'm trying to find a workaround that deals with the over-shoot. A "net" actor to stop the fast moving actor, with no restitution on collision, wont work for me. I also tried constraining an actor attribute to the magnitude() between the actor's position and the destination (x,y). But magnitude seems to always be a positive number, so checking for a <= zero condition doesn't work. Lastly, I tried to monitor this with an update timer. Every quarter second, I check the distance from the actors position to the actor's MoveToX and MoveToY attributes. If the distance is <= 5, then set the Motion.LinearVelocity.X/Y to zero. But that also doesn't work.

    Any other ideas for stopping over-shot with MoveTo set to a value closer to 600? To see this more frequently, set a high speed, like 1000 and move the actor to a couple actor attributes, named MoveToX and MoveToY. I'm open to any ideas...

    Thank you,

    John K.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Use Interpolate instead of Move To. It should hit the target every time.
  • quantumsheepquantumsheep Member Posts: 8,188
    Gotta agree with FMG - 'Interpolate' is my new favourite behaviour!

    (it helps if you say it like a Dalek would!)

    I use it for loads of stuff. So I should say thanks really.

    Thanks GS for interpolate!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    now just for the pause button hey QS ;)
  • jkanalakisjkanalakis Member, PRO Posts: 49
    Thank you, this is perfect. I changed MoveTo to interpolate and now everything moves quickly and stops accurately. As an added bonus, the ease-out function adds more polish. I really appreciate the great advice, thank you.

    John K.
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    interpolate rocks...
Sign In or Register to comment.