I have a stage and the actor on it with size 200x200. I need the actor catch touch events to make some calculations. But the problem is that touch events triggers only when touched over the actors bound. How can i get the event of touching any area of the screen, but handled inside the actor`s class?
public class MyActor extends Actor {
public MyActor() {
setBounds(100f, 100f, 200f, 200f);
addListener(new InputListener() {
@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {
return super.touchDown(event, x, y, pointer, button);
}
@Override
public void touchDragged(InputEvent event, float x, float y, int pointer) {
super.touchDragged(event, x, y, pointer);
}
@Override
public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
super.touchUp(event, x, y, pointer, button);
}
});
}