You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have an app where on a canvas im drawing some boxes and other stuff. I have some buttons that i use to change the camera position ( going to birdEye view and others like that). It has also the possibility to receive some configuration parameter that should set the position of the camera ( if the parameter is "birdEye" the canvas should render with the camera in the birdEye view). Initially it was working until i also had to add the possibility to change the camera ( PerspectiveCamera and OrthographicCamera). Changing the camera initialization from this
to this
breaks the functionality. I'm guessing the Controls are changing the camera position before the Perpective/Ortographic is initialized. Any idea how to fix this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have an app where on a canvas im drawing some boxes and other stuff. I have some buttons that i use to change the camera position ( going to birdEye view and others like that). It has also the possibility to receive some configuration parameter that should set the position of the camera ( if the parameter is "birdEye" the canvas should render with the camera in the birdEye view). Initially it was working until i also had to add the possibility to change the camera ( PerspectiveCamera and OrthographicCamera). Changing the camera initialization from this


to this
breaks the functionality. I'm guessing the Controls are changing the camera position before the Perpective/Ortographic is initialized. Any idea how to fix this?
I have a sandbox here https://codesandbox.io/s/blissful-firefly-2egtr?file=/src/App.jsx
So with the camera initialization in the canvas component it works, if i comment that and use the Perspective/OrthographicCamera it doesnt.
Beta Was this translation helpful? Give feedback.
All reactions