There is a class inherited from the actor.

I want to track the click specifically on it.

Adding the following:

setTouchable(Touchable.enabled); addListener(new ClickListener(){ @Override public void clicked(InputEvent event, float x, float y) { Gdx.app.log("Actor: ", "is clicked"); } }); 

Does not react to click, what is missing?

    1 answer 1

    Most likely you have:

    1. the size of the actor is not defined, for the listener this is mandatory. actor.setSize(100, 100); or actor.setBounds(0, 0, 100, 100)

    2. Actor not added to Stage: Stage.addActor (actor);

    3. Stage not assigned event handler Gdx.input.setInputProcessor(stage);