We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
about 3d projection bug in Director::setProjection()
about 3d projection bug in Director::setProjection()
Bug #4275 [Closed]
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
Status: | Closed | |
---|---|---|
Start date: | 2014-03-05 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | all | |
Target version: | - |
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.