Thanks for the answer !
Though I can’t get it to work :/
Here is what I do :
unsigned char *pigeonData = pigeon->getData(); // calls image->getData() inside pigeon.
unsigned char *pigeonPixel = pigeonData + pigeonIndice * 4; // pigeonIndice is the (x + y * width)
unsigned char redPigeon = *pigeonPixel;
unsigned char greenPigeon = *(pigeonPixel + 1);
unsigned char bluePigeon = *(pigeonPixel + 2);
Then I log using the following “template” :
cocos2d::CCLog("World::checkCollisions() > pigeonPixel = %x", pigeonPixel);And I do the same for r,g,b.
pigeonPixel gives me something, so data is not null, but r,g and b stay at 0 :/
I must be missing / doing something stupid here… :s
My aim is to add r,g,b and see if it’s different than 0 (transparent pixel or not).
Thanks again ! =D