- Modifié
libGDX InputListener issue
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.
- Tryed to position root bone in the center of an actor - just about the same trouble.
- Tryed to play with such code:
also doesn't work.setWidth(240); setHeight(180); setBounds(-240, 0, 240, 180);
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.
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?
ok, thanks!