}
//remove leftover spatials
for (Map.Entry<PhysicsGhostObject, Spatial> entry : oldObjects.entrySet()) {
PhysicsGhostObject object = entry.getKey();
Spatial spatial = entry.getValue();
spatial.removeFromParent();
}
}
private void updateCharacters() {
HashMap<PhysicsCharacter, Spatial> oldObjects = characters;