Setting Position and Rotation of camera (can't find any of my objects) #625
leo-petrucci
started this conversation in
General
Replies: 1 comment 2 replies
-
thats not how it works, these are just the initial values that the renderer and the cameras get. think of everything on the canvas element as a construction type of argument, the objects are literally constructed from it. you can get to the camera in useframe or usethree https://codesandbox.io/s/r3f-particles-i-q4d2v careful with ortho cams, they behave differently, changing the z vector has no effect because there's no perspective. they have a "zoom" property instead. |
Beta Was this translation helpful? Give feedback.
2 replies
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.
-
I wanted to use
react-three-gui
to move my camera around and have more control over where I'm viewing my scene from, however as soon as I set position or rotation I lose any trace of my meshes.What are the default values for camera position and rotation? Why does everything disappear when I set it to
[0,0,0]
?I created a sandbox here https://codesandbox.io/s/r3f-basic-demo-forked-jbm2t?file=/src/index.js
This also happens when trying to set my camera as
orthographic
, I just end up loosing all my meshes.Beta Was this translation helpful? Give feedback.
All reactions