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

Fix the bug of rotating camera #1655

Merged
merged 2 commits into from
Oct 18, 2021
Merged

Fix the bug of rotating camera #1655

merged 2 commits into from
Oct 18, 2021

Conversation

widcardw
Copy link
Contributor

Problem

I'd like to rotate the camera frame in one scene but something was wrong. It turned out to that the value of new_rot_T[2] went beyond [-1,1], which is fatal for the arccos function. The problem was probably caused by loss of precision in float calculation.

Proposed changes

As a result, clip function is called before Fz is passed into acos.

@TonyCrane TonyCrane requested a review from 3b1b October 18, 2021 11:46
@3b1b 3b1b merged commit f77e25f into 3b1b:master Oct 18, 2021
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

3 participants