Setting Anchor Point

Posted by Siddharth on Game Development See other posts from Game Development or by Siddharth
Published on 2012-06-30T12:15:42Z Indexed on 2012/06/30 15:26 UTC
Read the original article Hit count: 345

Filed under:

I want to set anchor point for the sprite like cocos2d has done for their implementation. I do not found any thing like that in andengine so please provide guidance on that. I want to move the sprite on touch so I use following code but that does not work for me.

super.setPosition(pX - this.getWidthScaled() / 2,
            pY - this.getHeightScaled() / 2);

Because I touch on the corner of the image but automatically it comes at center of the image because of above code. I want to remain the touch at desire position and drag it. For me the anchor point became useful. But I don't found anything in andengine.

© Game Development or respective owner

Related posts about andengine