Using CCDirector::convertToGL for the transformed node by CCCamera

Hi guys!

I have the layer that’s transformed with CCCamera. He’s looks like a plane rotated on 45 degrees around X-axis:

Here is 3D projection!
I need to compute 2D coordinates for this layer from 2D screen point:

kmGLPushMatrix();

transformAncestors();
transform();

CCPoint layerLocation = CCDirector::sharedDirector()->convertToGL(pTouch->getLocationInView());

kmGLPopMatrix();

The method CCDirector::convertToGL returns a wrong values for the touches thats above and below the Y:0.
How to modify this method for the right calculations? Cocos2dx 2.2.0

Thanks all!


Cocos2d-x_ 2.2.0 - 1024x768 - 1.00 2013-11-30 22.01.34.png (16.2 KB)

Where’s all???

up