- Home /
Find alternate shortest paths
It's a simple game where the rocket has to reach the point where the player touches on the screen. The movement of the rocket is physics based. When the rocket goes off screen on right side, it appears on left side and when it goes off on left side, it appears on right side. Similar for vertical axis.
In the picture above, the user touches on the bottom right corner. The rocket could either rotate and go there (Path 1) or it would directly go up left off the screen and appear on bottom right corner and reach there(Path 2). I want to implement the Path 2. How would it calculate the distances and determine the shorter path and then proceed in that direction?
Your answer
Follow this Question
Related Questions
How to compare several distances? 1 Answer
How does Pathfinding Project's DistancePointSegment work? 0 Answers
How would I create a Pacman enemy in 2D? 0 Answers
Help with my 2d pathfinding 0 Answers
Connecting the dots 0 Answers