简体   繁体   English

如何为旋转相机更改X3DOM鼠标模型

[英]How to change X3DOM mouse model for rotating camera

Currently X3DOM handles camera movement like all scene is in a sphere, dragging mouse left to right moves the sphere (thus the scene) around the center of that sphere, like this . 当前,X3DOM就像所有场景都在一个球体中一样处理摄像机移动,向左拖动鼠标左右移动球体(即场景)围绕该球体的中心, 就像这样

Can we change this behaviour like in Blender's, as the same left to right dragging rotates the scene around Z axis (in other words, changes the azimuth without changing the current elevation) and dragging from up to down changes the elevation, without changing azimuth, like this one ? 我们是否可以像在Blender中一样更改此行为,就像从左到右拖动一样围绕Z轴旋转场景(换句话说,在不更改当前高程的情况下更改方位角),而从上到下拖动则在不更改方位角的情况下更改高程,喜欢这个吗?

There are some navigation modes available: https://doc.x3dom.org/tutorials/animationInteraction/navigation/index.html . 有一些可用的导航模式: https : //doc.x3dom.org/tutorials/animationInteraction/navigation/index.html However I think you will have to create your own navigation mode if you want to have exact behaviour as in Blender. 但是我想,如果您想要像Blender中那样具有确切的行为,则必须创建自己的导航模式。

For example you could activate the "Turntable" mode adding the following to your scene node: 例如,您可以激活“转台”模式,将以下内容添加到场景节点:

<NavigationInfo type= 'turntable' ></NavigationInfo>

You can also find some discussion regarding more control over the navigation on mailing list and within the issues of X3DOM: https://github.com/x3dom/x3dom/issues/454 and https://github.com/x3dom/x3dom/issues/486 您还可以找到有关对邮件列表中的导航以及X3DOM问题进行更多控制的一些讨论: https : //github.com/x3dom/x3dom/issues/454https://github.com/x3dom/x3dom/问题/ 486

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM