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]
meilinwang@126.com 2014-03-05 04:08 . Updated over 10 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.

walzer@cocos2d-x.org 2014-10-08 02:55

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

This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8354

Atom PDF

Status:Closed
Start date:2014-03-05
Priority:Low
Due date:
Assignee:-
% Done:

0%

Category:all
Target version:-