I'm working on a small game and I'm trying to keep things as neat as possible. I've split up the inputprocessor into another class and it works fine. I've setup a playState class as well which handles and creates bodies and fixtures for Box2D.
And in my input processing class:
public class TouchProcessor implements InputProcessor {
//.....
@Override
public boolean touchDragged(int screenX, int screenY, int pointer) {
System.out.println("Dragging...");
touchHappening = true;
return true;
}
// ....
Now on touch drag, I want to reposition a body/camera from the Box2D world. But I don't have access to those in my Processor class if I separate it from the playState. How do I go about this?