Hey! thanks. that was really helpful. But just to further prove that I really don’t know what Im doing, here is another problem I can’t figure out.
I’m tring to compile and execute the OBJTest.java which is the example that was provided with the code, but everytime I get this message:
Loading: othermodels/tiletest/tile1.obj
then:
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:61)... etc...
Which I’m thinking is approptiate b.c there is no tile1.obj, or that folder . deleted the class file a couple times to make sure it was actiually compiling…
I couldn’t figure that out so I tried making a completely new folder and everything with the files there too, and now I’ve run into a new problem. I either get the NullPointerException or a String out of bound exception and i think I know why, but I don’t know what to do about it.
Here’s some code from the OBJLoader
public BranchGroup load(String objFile,NodeFactory factory,Vector3f vec) throws IOException {
System.out.println("Loading: "+objFile);
String basePath = objFile.substring(0,objFile.lastIndexOf("/"));
given that it sets the basepath to everything preceding a / does that mean it would only work on a Unix type file system since Windows uses \ instead of / ?? I’m getting the String out of Bounds exception b.c I took out the /'s so it never found one OR I’m getting the null pointer exception b.c I am including 's to show where my directory is and it’s never finding the file b.c this is Windows. That’s my current theory anyway. Could I just extract that line from the jar, change the line, recompile and stick it back in?? Thanks again for tolerating my inexperience!