骨架

Inherits: Spatial < Node < Object

类别: 核心

简要说明

角色和动画对象的骨架。

方法

无效

add_bone ( String name )

无效

bind_child_node_to_bone ( int bone_idx, Node node )

无效

clear_bones ( )

int

find_bone ( String name ) const

int

get_bone_count ( ) const

Transform

get_bone_custom_pose ( int bone_idx ) const

Transform

get_bone_global_pose ( int bone_idx ) const

String

get_bone_name ( int bone_idx ) const

int

get_bone_parent ( int bone_idx ) const

Transform

get_bone_pose ( int bone_idx ) const

Transform

get_bone_rest ( int bone_idx ) const

Transform

get_bone_transform ( int bone_idx ) const

Array

get_bound_child_nodes_to_bone ( int bone_idx ) const

bool

is_bone_rest_disabled ( int bone_idx ) const

无效

localize_rests ( )

无效

physical_bones_add_collision_exception ( RID exception )

无效

physical_bones_remove_collision_exception ( RID exception )

无效

physical_bones_start_simulation ( Array bones=[ ] )

无效

physical_bones_stop_simulation ( )

无效

set_bone_custom_pose ( int bone_idx, Transform custom_pose )

无效

set_bone_disable_rest ( int bone_idx, bool disable )

无效

set_bone_global_pose ( int bone_idx, Transform pose )

无效

set_bone_ignore_animation ( int bone, bool ignore )

无效

set_bone_parent ( int bone_idx, int parent_idx )

无效

set_bone_pose ( int bone_idx, Transform pose )

无效

set_bone_rest ( int bone_idx, Transform rest )

无效

unbind_child_node_from_bone ( int bone_idx, Node node )

无效

unparent_bone_and_rest ( int bone_idx )

常量

  • NOTIFICATION_UPDATE_SKELETON = 50

描述

骨架提供了用于管理骨骼的分层接口,包括姿势、静止和动画(请参见 Animation )骨架将在未来支持布娃娃动力学。

骨骼相对于骨骼的整体转换由以下层次顺序确定:静止姿势、自定义姿势和姿势。

请注意,下面的“全局姿势”是指骨骼相对于骨骼的整体转换,因此它不是骨骼的实际全局/世界转换。

属性描述

  • bool bones_in_world_transform

违约

设定器

设置“在世界中使用骨骼”转换(值)

吸气剂

在世界转换中使用骨骼

方法说明

  • void add_bone ( String name )

添加带名称的骨骼 name . get_bone_count 将成为骨骼指数。

  • void bind_child_node_to_bone ( int bone_idx, Node node )

很快就被否决了。

  • void clear_bones ( )

清除骨骼中的所有骨骼。

返回匹配的骨骼索引 name 作为它的名字。

  • int get_bone_count ( ) const

返回骨架中的骨骼数量。

返回指定骨骼的自定义姿势。自定义姿势应用于静止姿势的顶部。

返回指定骨骼相对于骨骼的整体转换。相对于骨架框架,这不是骨骼的实际“全局”转换。

  • String get_bone_name ( int bone_idx ) const

返回索引处骨骼的名称 index .

  • int get_bone_parent ( int bone_idx ) const

返回作为骨骼父级的骨骼索引 bone_idx . 如果-1,则骨骼没有父级。

注: 返回的父骨骼始终小于 bone_idx .

返回指定骨骼的姿势转换。姿势应用于自定义姿势的顶部,它应用于静止姿势的顶部。

返回骨骼的其余转换 bone_idx .

返回自定义姿势和姿势的组合。返回的转换位于骨架的引用框架中。

  • Array get_bound_child_nodes_to_bone ( int bone_idx ) const

很快就被否决了。

  • bool is_bone_rest_disabled ( int bone_idx ) const

  • void localize_rests ( )

  • void physical_bones_add_collision_exception ( RID exception )

  • void physical_bones_remove_collision_exception ( RID exception )

  • void physical_bones_start_simulation ( Array bones=[ ] )

  • void physical_bones_stop_simulation ( )

  • void set_bone_custom_pose ( int bone_idx, Transform custom_pose )

  • void set_bone_disable_rest ( int bone_idx, bool disable )

  • void set_bone_global_pose ( int bone_idx, Transform pose )

  • void set_bone_ignore_animation ( int bone, bool ignore )

  • void set_bone_parent ( int bone_idx, int parent_idx )

设置骨骼索引 parent_idx 作为骨骼的父级 bone_idx . 如果-1,则骨骼没有父级。

注: parent_idx 必须小于 bone_idx .

返回骨骼的姿势转换 bone_idx .

设置骨骼的其余变换 bone_idx .

  • void unbind_child_node_from_bone ( int bone_idx, Node node )

很快就被否决了。

  • void unparent_bone_and_rest ( int bone_idx )