Projects > cpp > Issues > Bug #4275

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

about 3d projection bug in Director::setProjection()

Bug #4275 [Closed] 2014-03-05 04:08 . Updated over 2 years ago

If we use 3d projection mode, we will set the modelview matrix by kmMat4LookAt function, where we need to calculate the eye position whose coordniate-z is derived from the function of getZeye().
In this function, (_winSizeInPoints.height / 1.1566f) is simplication of (_winSizeInPoints.height / 2 / tanf(pi/6)) where there is some deviation, the exact value should be 1.1547005383793f.
Normally this deviation can be igonred, however if we use framebuffer(RenderTexture), we may use the projection more than once, then the deviation error will be amplified, and we may get an unwished result. 2014-10-08 02:55

Redmine issue system is closed, we are using github issue system instead.

This issue was moved to

Atom PDF

Start date:2014-03-05
Due date:
% Done:


Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.