How to make a curved 2D Pathfinding for overworld?
Hello,
I was wondering if there was a possibility to implement curved pathfinding into unity 2D scripts.
As of right now I am aware of waypoints and the posibility of using them. However they are not 100%. I'm not sure how to describe exactly what I mean, but I added some pictures to what I exactly want to achieve.
So far I know is that the only posibility is to add hundreds of waypoints to simulate perfect movement. But is there any function that is build-in into unity? Or should I write my own mathematical functions and simply move the character one pixel at the time based on a vector.
Thank you for reading.
Does the exact amount of curvature/easing need to be defined in the editor or is it enough to have vaguely smooth paths? To get a circle like that, you'd most likely need to use splines / curves to define the path, otherwise, adding some sort of inertia to your object might be the solution (i. e. by using Unity's physics.)
Hello, thank you for your reply.
An example of something I am looking for: https://youtu.be/Lo5PPqHmsI$$anonymous$$?t=54s
If anyone could tell me how that is done that would be amazing!
Right, these are splines. There are a couple of packs on the asset store, there might be a few free ones on github as well. You could also try and program one yourself, it can be a bit tricky though.
Your answer
Follow this Question
Related Questions
2D NPC Movement 0 Answers
Make an object follow another object's path (Snake game) 0 Answers
Ball moving along a path. 0 Answers
Unity NavMesh path-finding with my own moment script. 1 Answer
WASD Joystick Movement Android 0 Answers