Jump to content

Custom path walking


Recommended Posts

Posted

You have the right idea, just the wrong execution. (You can try reading this but if it doesn't make sense, try some simpler java tutorials - https://javagoal.com/static-and-non-static-variable-in-java/)

 

 

There's a few different options but here's an easy one:

static List<Position> path;

static {
 path = new ArrayList<>();
 path.add(new Position(x,y,z));
 path.add(new Position(x,y,z));
 path.add(new Position(x,y,z));
}

// your onLoop would remain the same. 

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...