Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

Call touchUp() programattically for sprite in LibGDX

$
0
0

I’m trying to call touchUp() for a sprite i’ve created in my app.

i’m getting success but the co-ordinates do not match while i call it manually.

final int x = (int)mySprite.getX() + 10;
final int y = (int)(Gdx.graphics.getHeight() - (mySprite.getY() - 5));

touchDown(x, y, 0, 0);

this code calls method perfectly but positions do not match. x and y values that i get in touchUp() method is different. it call touch up event of another sprite.


Viewing all articles
Browse latest Browse all 434

Latest Images

Trending Articles



Latest Images