Skip to content

FlyControls

Fly controller for first-person-style free-flight through the scene. Installed via app.use(), access via app.$flyControls.

Usage

ts
import { FlyControls } from '@threeuse/core/plugins'

app.use(FlyControls, { movementSpeed: 10, dragToLook: true })
app.$flyControls // FlyControls instance

Options

OptionTypeDefaultDescription
movementSpeednumber5Movement speed
rollSpeednumber0.5Roll speed
dragToLookbooleantrueDrag to look around

Controls

InputAction
Mouse dragLook around
W / SMove forward / backward
A / DMove left / right
R / FMove up / down
Q / ERoll

Demo

飞行控制:🖱️ 拖拽 — 调整视角W / S — 前进 / 后退A / D — 左移 / 右移R / F — 上升 / 下降Q / E — 滚转

Released under the MIT License.