Does the pivot reading work for .OBJ files too or just .3DS?
I tried it with OBJ files and it didn't throw any error but they appear to have calculated object origins as before. The line of code I changed was:
// Configure JPCT to import object origins from model files.
Config.useRotationPivotFrom3DS = true;
If not, is there any chance this could be included? OBJ is for us a much better format because of the exporting functions in Max which allow us to strip out all transformations and get just the mesh data.
Just in-case I'm doing my rotations wrong here is my code:
// Load models - each one has object origin/pivot set to world origin (0,0,0).
honeyTop = new Object3D(loadModel(HONEY_TOP_MODEL_FILE, HONEY_TOP_TEXTURE_NAME));
honeyWall = new Object3D(loadModel(HONEY_WALL_MODEL_FILE, HONEY_WALL_TEXTURE_NAME));
honeyTrap = new Object3D(loadModel(HONEY_TRAP_MODEL_FILE, HONEY_TRAP_TEXTURE_NAME));
honeyOutline1 = new Object3D(loadModel(HONEY_OUTLINE1_MODEL_FILE, HONEY_OUTLINE_TEXTURE_NAME));
honeyOutline2 = new Object3D(loadModel(HONEY_OUTLINE2_MODEL_FILE, HONEY_OUTLINE_TEXTURE_NAME));
honeyOutline3 = new Object3D(loadModel(HONEY_OUTLINE3_MODEL_FILE, HONEY_OUTLINE_TEXTURE_NAME));
// Rotate to accommodate for coordinate system
honeyTop.rotateX(PI / -2f);
honeyWall.rotateX(PI / -2f);
honeyTrap.rotateX(PI / -2f);
honeyOutline1.rotateX(PI / -2f);
honeyOutline2.rotateX(PI / -2f);
honeyOutline3.rotateX(PI / -2f);
// Add to world
world.addObject(honeyTop);
world.addObject(honeyWall);
world.addObject(honeyTrap);
world.addObject(honeyOutline1);
world.addObject(honeyOutline2);
world.addObject(honeyOutline3);