本页内容

FirstPersonCameraController QML Type

FirstPersonCameraController 允许从第一人称视角控制场景摄像机。更多内容...

Import Statement: import Qt3D.Extras 2.12
Inherits:

Entity

Status: Technology preview

此类型处于技术预览阶段,可能会有变动。

属性

详细说明

FirstPersonCameraController 允许从第一人称视角控制场景摄像机。

控制方式如下:

输入操作
鼠标左键按住鼠标左键时,沿 x 轴移动鼠标可平移摄像机,沿 y 轴移动则可倾斜摄像机。
Shift键按住期间,精细移动控制处于激活状态。这会降低鼠标平移和俯仰的灵敏度。
方向键使摄像机相对于摄像机视口水平移动。
Page Up 和 Page Down 键使摄像机相对于摄像机视口进行垂直移动。

属性文档

acceleration : real

保存当前加速度。指定按住按键时摄像机线速度的增加速率。如果加速度为负值,则线速度保持恒定。默认值为 -1.0。

camera : Camera

保留当前控制的摄像头。

deceleration : real

指定松开按键时摄像机线速度的减速率。如果减速率为负值,则线速度保持恒定。默认值为 -1.0。

linearSpeed : real

保存摄像机控制器的当前线性速度。线性速度决定了摄像机的移动速度。

lookSpeed : real

保存摄像机控制器的当前视角速度。视角速度决定了摄像机水平旋转和垂直旋转的转速。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.