Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved ViewportPath failing to step

Joined
Nov 18, 2013
Messages
126
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

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
:(
 
Go check out new bots and give helpful feedback.
Joined
Jan 31, 2016
Messages
5,413
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

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
:(
Believe a pathing change cloud is working on may be the culprit, but it should be really temporary
 
Top