Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

LimitAngularVelocityModifier3D

继承: SkeletonModifier3D < Node3D < Node < Object

限制骨骼旋转角速度。

描述

这个修饰器通过对比上一帧和当前帧的骨骼姿态,来限制骨骼旋转的角速度。

你可以通过指定根骨骼和末端骨骼来添加骨骼链,然后将它们之间的骨骼添加到一个列表中。根据 exclude(排除)选项的设置,修饰器会处理这个列表中的骨骼,或者处理除了该列表之外的其他骨骼。

注意: 这个类中的大多数方法都带有一个 index(索引)参数。这个参数用来指定当 IK(反向运动学)包含多个设置项时,具体返回哪一个(比如 settings//root_bone_name)。

属性

int

chain_count

0

bool

exclude

false

int

joint_count

0

float

max_angular_velocity

6.2831855

方法

void

clear_chains()

int

get_end_bone(index: int) const

String

get_end_bone_name(index: int) const

int

get_root_bone(index: int) const

String

get_root_bone_name(index: int) const

void

reset()

void

set_end_bone(index: int, bone: int)

void

set_end_bone_name(index: int, bone_name: String)

void

set_root_bone(index: int, bone: int)

void

set_root_bone_name(index: int, bone_name: String)


属性说明

int chain_count = 0 🔗

  • void set_chain_count(value: int)

  • int get_chain_count()

链数。


bool exclude = false 🔗

  • void set_exclude(value: bool)

  • bool is_exclude()

如果为 true,则修改器会处理骨骼列表中未包含的骨骼。

如果为 false,则修改器处理的骨骼与骨骼列表中的骨骼相同。


int joint_count = 0 🔗

链式结构动态创建的列表中的关节数。


float max_angular_velocity = 6.2831855 🔗

  • void set_max_angular_velocity(value: float)

  • float get_max_angular_velocity()

每秒最大角速度。


方法说明

void clear_chains() 🔗

清除所有链。


int get_end_bone(index: int) const 🔗

返回骨骼链末尾骨骼的索引。


String get_end_bone_name(index: int) const 🔗

返回骨骼链末尾骨骼的名称。


int get_root_bone(index: int) const 🔗

返回骨骼链根骨骼的索引。


String get_root_bone_name(index: int) const 🔗

返回骨骼链根骨骼的名称。


void reset() 🔗

设置参考姿态,用于与当前姿态进行角度比较,并去除约束的影响。当关节发生变化或激活时,该函数会自动触发。


void set_end_bone(index: int, bone: int) 🔗

设置骨骼链中末端骨骼的索引。


void set_end_bone_name(index: int, bone_name: String) 🔗

设置骨骼链中末端骨骼的名称。

注意:末端骨骼必须是根骨骼或根骨骼的子骨骼。


void set_root_bone(index: int, bone: int) 🔗

设置骨骼链中根骨骼的索引。


void set_root_bone_name(index: int, bone_name: String) 🔗

设置骨骼链中根骨骼的名称。