I want to create an enemy using a zip file located in my models folder, but when I attempt to access the zip file, I get an error: AssetLoadException: Failed to open zip file: ubot.zip.
My code for creating enemies:
private void createEnemy(float x, float y, float z) {
assetManager.registerLocator("ubot.zip", ZipLocator.class);
Spatial enemy = assetManager.loadModel("main.scene");
//enemy.setLocalScale(2f);
CollisionShape shape = CollisionShapeFactory.createMeshShape(enemy);
RigidBodyControl phys = new RigidBodyControl(shape, 0.5f);
enemy.addControl(phys);
enemies.attachChild(enemy);
bulletAppState.getPhysicsSpace().add(phys);
}
Runtime says the error occurs when I try to make the spatial.