papsphilip Posted November 28, 2023 Share Posted November 28, 2023 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 Quote Link to comment Share on other sites More sharing options...
fencer Posted November 29, 2023 Share Posted November 29, 2023 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? Quote Link to comment Share on other sites More sharing options...
papsphilip Posted December 1, 2023 Author Share Posted December 1, 2023 problem is solved! the issue was the locking mechanism. As animatrix explained in sidefx forum the lock was probably not available to other points in the same for loop network iteration. So i stored the next point in an array attribute and in a different detail i read it and set my attributes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.