I am trying to make a collision between a sprite and an animated sprite. The animated sprite is the main character of the game. The problem I am facing is that when another sprite collides with the main character, it collides with the transparent bounding area around the character. How should I perform collision detection between the actual pixels of the character and any other obstacle sprite?
|
|
If your game need real world collision detection then you have to use box2d provided by andengine then after you do not have to worry about the collision. Because body for your different shapes have been created. EDIT : For the purpose of pixel perfect collision detection the following link can help you that I think. http://qwerjk.com/pixel-perfect/ In which they show demo and also provide example. |
|||||||
|
|
AndEngine Collision Extension: https://github.com/MakersF/AndEngineCollisionsExtension This is an extension that aims to bring different collision methods (perfect or approximations) to AndEngine GLES2 Supported Collision Methods: Pixel-Perfect Collision (supports: translation, scale, rotation, screw) It also support pixel-perfect collision between pixel-perfect shapes and retangular shapes, without the need for the latter to be a pixel-perfect shape. Alpha values different from 0 (you set the threshold that identify if a pixel is solid or not) You ca unse the utils methods to check the performances in your app or to output the collision mask to check if it is what you need |
|||
|
|
