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 instanceOptions
| Option | Type | Default | Description |
|---|---|---|---|
movementSpeed | number | 5 | Movement speed |
rollSpeed | number | 0.5 | Roll speed |
dragToLook | boolean | true | Drag to look around |
Controls
| Input | Action |
|---|---|
| Mouse drag | Look around |
| W / S | Move forward / backward |
| A / D | Move left / right |
| R / F | Move up / down |
| Q / E | Roll |
Demo
飞行控制:🖱️ 拖拽 — 调整视角W / S — 前进 / 后退A / D — 左移 / 右移R / F — 上升 / 下降Q / E — 滚转