• Editor
  • libGDX InputListener issue

Related Discussions
...

Hi guys!

I have a trouble with correct handling of a tap (or mouse click) on an actor using libGDX.

Made an actor skeleton in spine like this (root bone in the left bottom corner):

Image supprimée en raison de l'absence de support de HTTPS. | Afficher quand même

In libGDX i have an InputListener which works correctly in this case.

PROBLEM begins when i flip the image using skeleton.setFlipX(true):

Image supprimée en raison de l'absence de support de HTTPS. | Afficher quand même

My clickable area of actor in game reamains unchanged. It marked with dotted square on pic.

  1. Tryed to position root bone in the center of an actor - just about the same trouble.
  2. Tryed to play with such code:
    setWidth(240);
    setHeight(180);
    setBounds(-240, 0, 240, 180);
    also doesn't work.

I stuck - pls help!

Are you calling world update after flipping? Unfortunately Nate has just gone on his honeymoon so I can't give you much help.

20 jours plus tard

Flip will flip around the origin in Spine. You'll need to compensate for this in your game. How are you positioning the actor? How are you detecting clicks?

8 jours plus tard

ok, thanks!