- Joined
- Nov 18, 2013
- Messages
- 126
- Thread Author
- #1
Hi,
I've just started running into an issue with the ViewportPath#step returning false and not moving. Haven't changed any of my code and it worked fine, so not sure what's going on. Hopefully someone might have some insight. Thanks
I've just started running into an issue with the ViewportPath#step returning false and not moving. Haven't changed any of my code and it worked fine, so not sure what's going on. Hopefully someone might have some insight. Thanks
Code:
final BresenhamPath path = BresenhamPath.buildTo(tile);
if (path != null) {
ViewportPath screenPath = ViewportPath.convert(path);
if (screenPath != null) {
System.out.println(screenPath.getVertices());
System.out.println("PATH NOT NULL");
if (screenPath.step()) {
System.out.println(":)");
} else System.out.println(":(");
} else {
System.out.println("PATH NULL");
}
} else System.out.println("PATH IS NULL");
Code:
[Coordinate(3207, 3222, 1), Coordinate(3206, 3222, 1)]
PATH NOT NULL
:(