We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
想通过dat.gui按钮来设置一下FlyCameraController.setCamera(),发现不起作用。 刚创建相机时 调用FlyCameraController.setCamera()可以生效,使用dat.gui按钮就不生效了。 但是HoverCameraController却可以在dat.gui中setCamera。
通过以下步骤产生bug:
希望fly相机可以和hover相机一样跳转镜头
https://codepen.io/OriIIusion/pen/MWxOeVJ
fly相机点击5个按钮后,可以在控制台看到FlyCameraController.targetPos和FlyCameraController.lookAtPos已经改变,但是相机本身的position和rotation却不改变
The text was updated successfully, but these errors were encountered:
我看了下源码,在FlyCameraController组件中,通过setCamera设置的targetPos与lookAtPos在初始化时通过lookAt指定了相机位置和朝向,在此后,可以通过按键F手动更新。
FlyCameraController
setCamera
targetPos
lookAtPos
lookAt
F
但朝向设置可能有点问题,因为朝向更新是根据鼠标指针设置相机欧拉角旋转,通过按键F手动更新相机位置和朝向时,如果在这之前鼠标指针修改了欧拉角旋转,那么相机的欧拉角旋转会与lookAt设置的四元数旋转产生冲突,在这里的优先级为欧拉角,所以手动更新后,相机的朝向可能不会改变。
Sorry, something went wrong.
感谢大佬解释!
No branches or pull requests
Bug描述
想通过dat.gui按钮来设置一下FlyCameraController.setCamera(),发现不起作用。
刚创建相机时 调用FlyCameraController.setCamera()可以生效,使用dat.gui按钮就不生效了。
但是HoverCameraController却可以在dat.gui中setCamera。
Bug复现流程
通过以下步骤产生bug:
期待的结果
希望fly相机可以和hover相机一样跳转镜头
代码示例
https://codepen.io/OriIIusion/pen/MWxOeVJ
其他信息
fly相机点击5个按钮后,可以在控制台看到FlyCameraController.targetPos和FlyCameraController.lookAtPos已经改变,但是相机本身的position和rotation却不改变
The text was updated successfully, but these errors were encountered: