Motor Joint: Allows specifying the relative position and angle between two rigid bodies, and then attempts to achieve these targets by applying forces and torques, striving to maintain this configuration.
The self body of the joint, effective only on the first setting.
Zh
[首次设置有效]关节的自身刚体。
访问器
angularOffset
get angularOffset(): number
返回 number
En
The angular offset based on the other body, which is also the target angle for the self body.
Zh
基于 otherBody 的角度偏移量,也是 selfBody 的目标角度。
set angularOffset(value): void
参数
value: number
返回 void
awaked
get awaked(): boolean
返回 boolean
En
whether the component has been awakened.
Zh
组件是否已经被唤醒。
correctionFactor
get correctionFactor(): number
返回 number
En
The factor of easing when the self body moves towards the target position, with a value from 0 to 1, the larger the value, the faster the speed.
Zh
selfBody 向目标位置移动时的缓动因子,取值 0~1,值越大速度越快。
set correctionFactor(value): void
参数
value: number
返回 void
destroyed
get destroyed(): boolean
返回 boolean
En
whether the component has been destroyed.
Zh
组件是否已经被销毁。
enabled
get enabled(): boolean
返回 boolean
En
whether the component is enabled.
Zh
是否启用组件。
set enabled(value): void
参数
value: boolean
返回 void
hideFlags
get hideFlags(): number
返回 number
En
The hide flags that determine the hiding behavior of the component.
Zh
确定组件隐藏行为的标志。
set hideFlags(value): void
参数
value: number
返回 void
id
get id(): number
返回 number
En
The unique identifier for the component.
Zh
组件的唯一标识。
joint
get joint(): any
返回 any
En
[read-only] Native joint object.
Zh
[只读]原生关节对象。
linearOffset
get linearOffset(): any[]
返回 any[]
En
The offset from the other body's coordinates, which is also the target position for the self body.
Zh
基于 otherBody 坐标位置的偏移量,也是 selfBody 的目标位置。
set linearOffset(value): void
参数
value: any[]
返回 void
maxForce
get maxForce(): number
返回 number
En
The maximum force applied by the motor joint when the selfBody deviates from the target position. When the force applied by the motor joint exceeds the maximum force, the engine automatically limits the force to ensure it does not exceed the specified maximum value.
The maximum torque is used to ensure that when the torque applied by the motor joint exceeds the maximum torque value, the engine automatically limits the torque to not exceed the specified maximum value.
Checks if the component has a specific hide flag set.
Zh
检查组件是否设置了特定的隐藏标志。
isValid
isValid(): boolean
返回 boolean
onAdded
onAdded(): void
返回 void
En
Called after the component is added to a node. Unlike Awake, onAdded is called even if the node is not active.
Zh
组件被添加到节点后调用,与 onAwake 不同的是,即使节点未激活也会调用 onAdded。
Blueprint Event
onAwake
onAwake(): void
返回 void
En
Executed after the component is activated. At this point, all nodes and components have been created. This method is executed only once.
Zh
组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次。
Blueprint Event
onDestroy
onDestroy(): void
返回 void
En
Executed when the node is destroyed manually.
Zh
手动调用节点销毁时执行。
Blueprint Event
onDisable
onDisable(): void
返回 void
En
Executed when the component is disabled, such as when the node is removed from the stage.
Zh
组件被禁用时执行,比如从节点从舞台移除后。
Blueprint Event
onEnable
onEnable(): void
返回 void
En
Executed after the component is enabled, such as when the node is added to the stage.
Zh
组件被启用后执行,比如节点被添加到舞台后。
Blueprint Event
可选onLateUpdate
onLateUpdate(): void
返回 void
En
Executed every frame during the late update phase, after the update phase.
Zh
每帧更新时执行,在 late update 阶段,update 阶段之后。
Blueprint Event
可选onPostRender
onPostRender(): void
返回 void
En
Executed after rendering.
Zh
渲染之后执行。
Blueprint Event
可选onPreRender
onPreRender(): void
返回 void
En
Executed before rendering.
Zh
渲染之前执行。
Blueprint Event
可选onReset
onReset(): void
返回 void
En
Resets the component's parameters to their default values. If this function is implemented, the component will be reset and automatically recycled for future use.
If not reset, it will not be recycled for reuse.
En
Motor Joint: Allows specifying the relative position and angle between two rigid bodies, and then attempts to achieve these targets by applying forces and torques, striving to maintain this configuration.
Zh
马达关节:允许指定两个刚体间的相对位置和角度,然后尝试通过施加力和扭矩来达到这些目标,并会尽力维持这样的配置。