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

Error: The camera must be a PerspectiveCamera to orbit controls work #24

Closed
Osmanity opened this issue Aug 31, 2023 · 2 comments · Fixed by #25
Closed

Error: The camera must be a PerspectiveCamera to orbit controls work #24

Osmanity opened this issue Aug 31, 2023 · 2 comments · Fixed by #25

Comments

@Osmanity
Copy link

Osmanity commented Aug 31, 2023

Im using r3f-native library which works as charm, but the thing is that I want to change the camera to orthographic instead of Perspective but gets me the following error:

Error: The camera must be a PerspectiveCamera to orbit controls work

Here is my code:

<Canvas orthographic camera={{ zoom: 50, position: [0, 0, 100] }}>

<pointLight position={[10, 10, 10]} />
{*

*}

Thanks!:)

@TiagoCavalcante
Copy link
Owner

Hi @Osmanity, thanks for creating the issue!
I have released a new version that adds support to OrtographicCamera's.

@Osmanity
Copy link
Author

Osmanity commented Sep 1, 2023

Thanks for the quick reply, will try it later this evening!:)

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 a pull request may close this issue.

2 participants