Esempio n. 1
0
 private StaticPhysicsNode loadCheckpointModel(String modelPath) {
   StaticPhysicsNode checkPoint = physicsSpace.createStaticNode();
   checkPoint.setLocalTranslation(trackLocation);
   checkPoint.attachChild(ModelUtil.convertOBJToStatial(ResourcesPath.MODELS_PATH + modelPath));
   checkPoint.setLocalScale(1f);
   checkPoint.setMaterial(Material.GHOST);
   StateUtil.makeTransparent(checkPoint);
   return checkPoint;
 }
Esempio n. 2
0
 private void createTrack(Vector3f trackLocation) {
   track = physicsSpace.createStaticNode();
   track.setLocalTranslation(trackLocation);
   track.setLocalScale(1f);
   track.attachChild(
       ModelUtil.convertOBJToStatial(ResourcesPath.MODELS_PATH + "obj/raceTrack.obj"));
   track.generatePhysicsGeometry(true);
   track.setMaterial(Material.IRON);
   this.attachChild(track);
 }