BlockWerk 文档
🕹

Joystick 2D

Sources

交互式双轴操纵杆(Joystick)。拖动手柄——即使在仿真运行期间——两个轴的输出信号也会实时紧密跟随。在模型中放置操纵杆(或任何交互式输入方块)会自动将仿真切换为实时步进调步。

在 BlockWerk 中仿真

浏览器即开即用的交互式仿真环境 — 无需安装,由 WebAssembly 强力驱动。

在 BlockWerk 中仿真 →

输入与输出

Direction ID Label 类型 Status
← Out x X number Output
← Out y Y number Output

参数

参数 Label 类型 默认值 描述
valueX X Value number 0 Current X deflection — written by the on-canvas knob. Bounded with Y to the unit circle (|(x,y)| ≤ 1).
valueY Y Value number 0 Current Y deflection — written by the on-canvas knob. Bounded with X to the unit circle (|(x,y)| ≤ 1).
gain Gain number 1 Output scale: out = deflection × gain
springReturn Spring Return boolean true Snap the knob back to (0,0) when released

使用示例

  • 飞行器飞控仿真:将 x、y 轴输出直接连接至飞行动力学模型的姿态指令端口。

说明与最佳实践

  • 实时动态交互:结合示波器或 3D 姿态显示方块,可获得极为逼真的即时人机交互反馈。

相关模块