-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
setPosition does not set position #368
Comments
Thanks for your report. I think that is the same as a known issue: focalOffset( setOrbitPoint ) breaks setLookAt. You need to set focalOffset to 0, 0, 0 before calling setLookat |
Hey, thanks for a pointer in the right direction, but setFocalOffset 0,0,0 doesn't solve my issue. I'm building a feature which saves the camera position and restores it. If you save a cameraposition (with focaloffset), then restore that cameraposition by setting focalOffset (0,0,0), it's not going to be the same cameraposition as the one you saved. Is there a way to get the actualCameraPosition which takes the focalOffset into account? |
focalOffset is like a post process. I've tried to fix it many times but I couldn't... |
Even if we could have the actualCameraPosition and move the negative amount of actualCameraPosition to collapse, it doesn't move the expected point. Because focalOffset moves to the point forcibly right after the position update. |
Okay, if this is the same bug as 303 I'll close this issue |
Describe the bug
Both setPosition and setLookAt don't reliably set a camera position.
To Reproduce
Steps to reproduce the behavior:
Code
Live example
https://codesandbox.io/s/camera-controls-setposition-7dl2e3?file=/src/index.js:3164-3214
Expected behavior
Setposition after 2 and 4 use the same vector3, so they should use the same camera position
Screenshots or Video
No response
Device
No response
OS
No response
Browser
No response
The text was updated successfully, but these errors were encountered: