Jump to content

VEX pathfinding problem


Recommended Posts

i have an image on a grid. part of the grid gets colored and the rest stays black.

i shuffle the colored points position and then try to make them find their target position eventually forming the original image again.

Everything happens on the same grid by transferring the Cd and id attributes to the next chosen point based on a simple pathfinding algorithm.

The problem is they keep overriding each other and in the end not all points make it to the end.

cant really find the problem in the code, or in the method.

Any ideas or tips?

pathfinding.hiplc

Link to comment
Share on other sites

Did you try not to override "id"? If in the beginning you already know target id, you need to move this point towords target with no changes, right?
I just checked "tgt_pt" and "pos2" and they change every frame, they not suppose to be constant all time?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...