Replies: 1 comment 1 reply
-
do you use controls? they will immediately overwrite all your transforms, that's what they're made for. other than that you have to google "threejs can't rotate camera", there must be a reason - this is a threejs thing, but don't really know what it could be other than controls. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have this above code but for some reason the camera is still looking at the model straight ahead. I want it to look at the model a little from the top. I tried adding rotation through props and through the onCreated function as well, but still no dice. Not sure what simple thing I am missing here.
I refactored the code to be like this, where camera is its own function component. With this the camera is set to center (inside) of the object. None of the values seems to have been applied through the useEffect
No dice 🤷♂️
The strange thing with rotation in props like this is that everything except rotation is applied. Whether I use it like this
rotation={[0, 0, Math.PI]}
or
rotation={[0, Math.PI, 0]}
or
rotateY={180}
It is all the same, no impact whatsoever 🤷♂️
What am I missing to factor in?
Beta Was this translation helpful? Give feedback.
All reactions