Jump to content
catman11566

[Novice question] Basic Path Finding without Solver

Recommended Posts

Hey guys!

Ive recently been trying to code a basic path finder, for pipes on a building. I have tried writing it in a vex for loop, without much success.

Did i just code it wrong, or is this even possible without using the solver node? I have a lot of buildings and i want to generate the pipes without running the timeline, any ideas?

Thank for the help!

Share this post


Link to post
Share on other sites
1 hour ago, Whatsinaname said:

Have you tried the FindShortestPathSOP?

I have, but it chooses paths im not totally in love with. For example it'll make a zig zag from start to end, as opposed to a single right angle. I think ill move forward using it the best i can.

But for my own understanding, is it at all possible to do what i mentioned without a solver node? Feedback information to use again in the same vex code?

Share this post


Link to post
Share on other sites

Nesting two loops into each other should be sufficient for a greedy algorithm:

while(you are not close enough to the target){
	update current position and overall search direction
    for(a few new tries to find the best next step)
}

 

Share this post


Link to post
Share on other sites

without solver you can easily use For Loop With Feedback and break using Stop Condition whenever you are happy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×