Slow pathfinding

0 favourites
  • 14 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • In my tests with the pathfinding in a simple test with rotation enabled, the calculation seems very fast.

    However, with the rotation turned off, the time you spend to rotate the sprite, it still used but not rotate the sprite. So it gives the feeling that the calculation is slower.

    I tested with simple pathfinding, a sprite and by clicking a button to go to a position without more.

    Does anyone else has noticed?

    Edit to put a demo of the error. Demo - mediafire.com/download/bb1zb491ammbglb/Demo.capx

  • So THAT'S what's happening.

    I have the same problem. Going forward, the object follows the path immediately.

    But when I order it to go back, it takes 2-3 seconds before it starts moving. I've DISABLED rotation, so this would explain what's happening - that it takes 2-3 seconds to rotate backwards(in the game code, but not visually) before it moves off.

    I hope this can get fixed.

    Ashley - Is this a bug or is it intended functionality?

  • Oh, is this why there's lag in pathfinding? I always just thought it was b/c pathfinding has a pretty significant calculation time (particularly b/c we can't limit pathfinding area) and this was just masked when the object is rotating.

    Would love if this was fixed.

  • I seem to recall that on path found, you can set the angle of the object to the first node via events to speed that up.

  • What if your path zig-zags tho or goes around a lot?

    You should't need to "trick" or "force" the behavior into doing something it should be doing by default. It really looks like there's a bug/oversight with it.

  • I just set that "on start of layout" Set rotation speed to something really hig and it works pretty good. Awesome thread by the way i was struggling with getting a good result, but now i have somethimg im happy with :)

  • Ashley

    Can't we just get the ability to make turning instant?

  • OOh, so that's the reason... <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Okay, run a scenario by me again? What's going on?

    I'm not sure I'm completely following the hang-up in Path Finding...

  • Rhindon

    The object following the path isn't set to rotate so it appears to sit and wait, like it's following and invisible object that did have to turn around.

    And apparently setting the rotate speed up, makes the invisible object turn around quicker, so your object waits less.

  • Paradox - Aaah, okay. I encountered that, too, and so I set the rotation speed to something up in the hundreds. LOL

  • I have not really explained very well. So, I upload an example, to make it look easier.

    I think this is wrong, I mean, it is too bad the effect of standing the character, before you let him move if not rotate.

    Demo - mediafire.com/download/bb1zb491ammbglb/Demo.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • In my tests with the pathfinding in a simple test with rotation enabled, the calculation seems very fast.

    However, with the rotation turned off, the time you spend to rotate the sprite, it still used but not rotate the sprite. So it gives the feeling that the calculation is slower.

    It has been over 2 years since this has been posted, but I absolutely still needed to register just to thank you for posting this.

    THANK YOU!

  • Yes, this post is 5 years old, and even though I'm on one of the latest version of C2, it also helped me figure out why my sprite had delay before moving even tho the "Rotate" parameter is turned off. Thank you very much !

    So what's happening is, by default, there is a slow rotation used, and even if you set "Rotate object" to No, when telling the object to move along the path once it's been found, your object will still do like a ghost rotation, and that's what's delaying the movement.

    You can do the test by setting a slow rotation speed, then Enable the rotation, and if you tell your sprite to go left, then right, you'll notice it's taking its time to rotate, and that's what's causing the delay.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)