Inherits: SkeletonModification2D < Resource < RefCounted < Object
A modification that applies the transforms of PhysicalBone2D nodes to Bone2D nodes.
This modification takes the transforms of PhysicalBone2D nodes and applies them to Bone2D nodes. This allows the Bone2D nodes to react to physics thanks to the linked PhysicalBone2D nodes.
Experimental. Physical bones may be changed in the future to perform the position update of Bone2D on their own.
|
void | |
get_physical_bone_node ( int joint_idx ) const | |
void | set_physical_bone_node ( int joint_idx, NodePath physicalbone2d_node ) |
void | start_simulation ( StringName[] bones=[] ) |
void | stop_simulation ( StringName[] bones=[] ) |
0
The number of PhysicalBone2D nodes linked in this modification.
Empties the list of PhysicalBone2D nodes and populates it with all PhysicalBone2D nodes that are children of the Skeleton2D.
Returns the PhysicalBone2D node at joint_idx.
Sets the PhysicalBone2D node at joint_idx.
Note: This is just the index used for this modification, not the bone index used in the Skeleton2D.
Tell the PhysicalBone2D nodes to start simulating and interacting with the physics world.
Optionally, an array of bone names can be passed to this function, and that will cause only PhysicalBone2D nodes with those names to start simulating.
Tell the PhysicalBone2D nodes to stop simulating and interacting with the physics world.
Optionally, an array of bone names can be passed to this function, and that will cause only PhysicalBone2D nodes with those names to stop simulating.
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_skeletonmodification2dphysicalbones.html