I'm making a zombie-shooting game about which I'm very excited. I've just run into a problem, though: when I enable shadows and I press fire my shotgun, the following message immediately appears. The two casters so far are the hero and his shotgun. The only receiver is the ground. But when you fire, a bullet (which is a sphere as returned by Primitives.getSphere(...)) is spawned. Note: line 583 is sh.drawScene();
QuoteException in thread "main" java.lang.NullPointerException
at com.threed.jpct.Object3D.setAdditionalColor(Object3D.java:2632)
at com.threed.jpct.util.ShadowHelper.drawScene(ShadowHelper.java:401)
at com.threed.jpct.util.ShadowHelper.drawScene(ShadowHelper.java:342)
at RPG3D.doShadows(RPG3D.java:583)
at RPG3D.draw(RPG3D.java:563)
at RPG3D.gameLoop(RPG3D.java:522)
at RPG3D.<init>(RPG3D.java:168)
at RPG3D.main(RPG3D.java:928)