跳转到内容

uBot Multirotor Manual Input

C++
UUBotMultirotorManualInputComponent
父类
UActorComponent
类型
组件 · 可在 Components 面板添加
模块
UBotAerial · UBotAerial 0.1.0
头文件
Source/UBotAerial/Public/UBotMultirotorManualInputComponent.h

本地玩家控制(附身)所属多旋翼时,用键盘或手柄驾驶它。输入动作和映射上下文在运行时创建(Enhanced Input),不需要资产;要改按键就设置自己的。控制期间每帧发送一条指令。控制结束时,速度模式下刹车悬停;姿态和角速度模式下按 Command Loss Action 处理,默认悬停。

纯函数 · UUBotMultirotorManualInputComponent.GetAxes

最近一帧经过死区处理后的各个轴。

引脚方向类型
Return Value输出UBot Manual Flight Axes结构体

纯函数 · UUBotMultirotorManualInputComponent.IsControlling

这个组件正在驾驶无人机时为 true。

引脚方向类型
Return Value输出Boolean
属性类型默认值说明
Dead ZoneDeadZone · Manual InputFloat0.15摇杆死区,占满偏转的比例。范围 0.0 – 0.9;蓝图读写,Details 可编辑
Flight ModeFlightMode · Manual InputEUBot Manual Flight Mode枚举Velocity摇杆控制的内容。蓝图读写,Details 可编辑
Max Body Rate Degrees Per SecondMaxBodyRateDegreesPerSecond · Manual InputFloat220.0满偏转时的横滚和俯仰角速度(Rate 模式),单位 deg/s。最小 0.0;蓝图读写,Details 可编辑
Max Horizontal Speed Meters Per SecondMaxHorizontalSpeedMetersPerSecond · Manual InputFloat5.0满偏转时的水平速度(Velocity 模式),单位 m/s。最小 0.0;单位 MetersPerSecond;蓝图读写,Details 可编辑
Max Tilt DegreesMaxTiltDegrees · Manual InputFloat30.0满偏转时的倾角(Angle 模式),单位度。范围 0.0 – 60.0;单位 Degrees;蓝图读写,Details 可编辑
Max Vertical Speed Meters Per SecondMaxVerticalSpeedMetersPerSecond · Manual InputFloat2.0满偏转时的爬升或下降速度,单位 m/s。最小 0.0;单位 MetersPerSecond;蓝图读写,Details 可编辑
Max Yaw Rate Degrees Per SecondMaxYawRateDegreesPerSecond · Manual InputFloat90.0满偏转时的偏航角速度,单位 deg/s。最小 0.0;蓝图读写,Details 可编辑
Take Control when PossessedbTakeControlWhenPossessed · Manual InputBooleantrue本地玩家附身无人机的 Pawn 时自动接管无人机。蓝图读写,Details 可编辑
Custom Mapping ContextCustomMappingContext · Manual Input|CustomInput Mapping Context对象引用None自己的映射上下文,必须映射 Custom Move Action 和 Custom Yaw Action。为空时使用内置按键。蓝图读写,Details 可编辑
Custom Move ActionCustomMoveAction · Manual Input|CustomInput Action对象引用None自己的移动动作(Axis3D:前、右、上),和 Custom Mapping Context 一起使用。蓝图读写,Details 可编辑
Custom Yaw ActionCustomYawAction · Manual Input|CustomInput Action对象引用None自己的偏航动作(Axis1D,正值向右转),和 Custom Mapping Context 一起使用。蓝图读写,Details 可编辑
Mapping PriorityMappingPriority · Manual Input|CustomInteger1映射上下文的优先级。蓝图读写,Details 可编辑