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
通过HoverCameraController组件的setCamera方法设置相机视角,当视角参数的y坐标明显大于0很多时如20(或者distance距离过远时如600),鼠标缩放到接近y为0的高度时,滑轮缩放比例异常,十分缓慢,无法缩放到模型地表。
通过以下步骤产生bug:
鼠标滑轮缩放正常,能正常缩放至地表。
本地运行出错的Orillusion引擎版本, "@orillusion/core": "^0.8.4"
The text was updated successfully, but these errors were encountered:
HoverCameraController 的缩放距离受 minDistance 和 maxDistance 限制
HoverCameraController
minDistance
maxDistance
private onMouseWheel(e: PointerEvent3D) { if (!this.enable) return; this._wheelStep = (this.wheelStep * Vector3Ex.distance(this._currentPos.transform.worldPosition, this.camera.transform.worldPosition)) / 10; this.distance -= Engine3D.inputSystem.wheelDelta * this._wheelStep; this.distance = clamp(this.distance, this.minDistance, this.maxDistance); }
minDistance 默认值是 0.1,如果场景尺寸非常小,可以适当调小这个值,或者推荐将整体场景进行适当放大
0.1
Sorry, something went wrong.
HoverCameraController 的缩放距离受 minDistance 和 maxDistance 限制 private onMouseWheel(e: PointerEvent3D) { if (!this.enable) return; this._wheelStep = (this.wheelStep * Vector3Ex.distance(this._currentPos.transform.worldPosition, this.camera.transform.worldPosition)) / 10; this.distance -= Engine3D.inputSystem.wheelDelta * this._wheelStep; this.distance = clamp(this.distance, this.minDistance, this.maxDistance); } minDistance 默认值是 0.1,如果场景尺寸非常小,可以适当调小这个值,或者推荐将整体场景进行适当放大
您好,我把该数值调整到了0.01,但在靠近地表的部分缩放仍然很吃力
0.01
目测应该还是尺寸太小的原因,0.01相对模型还是太大了,而且好像原点都不一定在地板上,可以把模型zip上传一下,我们看一下模型具体尺寸
No branches or pull requests
Bug描述
通过HoverCameraController组件的setCamera方法设置相机视角,当视角参数的y坐标明显大于0很多时如20(或者distance距离过远时如600),鼠标缩放到接近y为0的高度时,滑轮缩放比例异常,十分缓慢,无法缩放到模型地表。
Bug复现流程
通过以下步骤产生bug:
x: -200.84649658203125,
y: 0.11393391340970993,
z: 38.04443359375,
pitch: -67.58179999999754,
roll: 181.29546000801645,
distance: 670.7881136027783
},
期待的结果
鼠标滑轮缩放正常,能正常缩放至地表。
报错截图
12.30.1.mp4
测试引擎版本:
本地运行出错的Orillusion引擎版本, "@orillusion/core": "^0.8.4"
本机系统 (请填写完整):
本机配置
代码示例
The text was updated successfully, but these errors were encountered: