public void collision(PhysicsCollisionEvent event) {

        if (event != null) {


            Spatial a = event.getNodeA();
            Spatial b = event.getNodeB();


            if (b != null && a != null) {

                final String nameA = a.getName();
                final String nameB = b.getName();

                final boolean isPortal = portalName.equals(nameB);
                final boolean isPlayer = "Me".equals(nameA);

                if (isPortal && isPlayer) {

                    System.out.println(nameB + " : " + nameA);

                    if (timeIsRight()) {
                        lastTeleported = System.currentTimeMillis();

                        System.out.println("A: " + nameA + "\t B: " + nameB);
                        disabled = true;
                        setRigidBody(false);
                        sendPlayerToPosition(Portal.getPortalPosition(portalMap.get(nameB)));

                    } else {

                        System.out.println("!A: " + nameA + "\t B: " + nameB);

                    }
                }
            }
        }


    }