Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed zoom ratio when alignWithScreen is false

Merged
merged 1 commit into from Feb 10, 2020

Conversation

2youyou2
Copy link
Contributor

@2youyou2 2youyou2 commented Feb 9, 2020

Re: cocos-creator/2d-tasks#

Changes:

  • fixed zoom ratio when alignWithScreen is false, orthoSize should be less when zoomRatio is bigger

@@ -782,7 +782,7 @@ let Camera = cc.Class({
fov = Math.atan(Math.tan(fov / 2) / this.zoomRatio) * 2;
this._camera.setFov(fov);

this._camera.setOrthoHeight(this._orthoSize * this.zoomRatio);
Copy link
Contributor

@holycanvas holycanvas Feb 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个之前没有测视例测出问题么?

Copy link
Contributor Author

@2youyou2 2youyou2 Feb 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的

@holycanvas holycanvas merged commit 6ae7eab into cocos:v2.3.0-release Feb 10, 2020
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants