public void collisionOccured(CollisionEvent event) { Body inputBody = null; if (event.getBodyA() == in.getBody()) { inputBody = event.getBodyB(); } else if (event.getBodyB() == in.getBody()) { inputBody = event.getBodyA(); } if (inputBody == null) return; in.handleWorldInput((KObject) inputBody.getUserData()); }