Issues with "Move To"

NexusGameStudioNexusGameStudio Member Posts: 265
edited November -1 in Working with GS (Mac)
So I'm using the "move to" behavior to control a camera on my menu system, everything works perfectly, however, the "move to" rule seems to be rather broken (I see others have the same view considering the forum posts about this rule). The camera will sometimes miss its coordinates in which its supposed to move to by slightly moving beyond it or sometimes it just keeps moving without stopping.

My only fix right now (and its still kinda iffy) is I added a timer in which it has the exact timing of the distance between menu A and menu B, after X amount of seconds, it constrains the X or Y coordinates to its final position, that way if it goes beyond, it just snaps back. I have also added a rule to the camera actor where if it passes a certain coordinate, it destroys itself. Again, its not perfect, but it works for now...somewhat, better than without it.

My question is, do any of you fine folk have any ideas to make this rule work correctly, or perhaps another concepts to move my camera to the correct coordinates perfectly?

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    Use interpolate :D

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

  • NexusGameStudioNexusGameStudio Member Posts: 265
    I haven't quite got that rule nailed down (mainly because I haven't really had the need for it until now). If I want to move for example to a coordinate of x720 or x240 based on scene, would I basically consider the coordinates relevant to scene or actor to determine distance? So if I wanted to move to scene coordinate x240, would I say 240 or do it in a smaller, negative value in relevance to the camera actor?
  • juzcookjuzcook Member Posts: 259
    Use interpolate, it's much more reliable than move to!

    Edit: QS beat me to it
  • NexusGameStudioNexusGameStudio Member Posts: 265
    Ignore my second post, I'VE FIGURED IT OUT! Did I ever mention I how super radical you guys are :D
  • dotsonj23dotsonj23 Member Posts: 316
    Interpolate. Another work around I used before is a non-visible, non-movable actor that blocks your camera actor from moving past a certain point.
  • ARC_GamesARC_Games Member Posts: 78
    yes, I agree... the MOVE TO behavior in GS seems buggy and completely unreliable. I had to change the motion of my "moving to a particular location" actors so that they just change the linear velocity values back and forth based on Rules for >= the destination points.

    didn't think to use interpolate (i.e. interpolate the position values to the destination point positions over a specified amount of time), but that seems like a good idea, but not sure which way would give better code efficiency, interpolating the position values.... or changing the linear velocity values and then testing for when the position reaches destination and changing velocity values again to stop/change direction of movement.
  • frariofrario Member Posts: 164
    Thanks god I found this thread. I was going crazy! One day of work for the camera on a single scene...

    My camera was working on preview, but not on iphone (it was scrolling all the way to the left instead of stopping where it had to). I'm currently building it updated. I'll let you know if interpolate solved.
Sign In or Register to comment.