BoneAttachment3D
А node that dynamically copies or overrides the 3D transform of a bone in its parent Skeleton3D
.
class BoneAttachment3D
This node selects a bone in a Skeleton3D
and attaches to it. This means that the BoneAttachment3D
node will either dynamically copy or override the 3D transform of the selected bone.
Superclasses
class Node3D
Most basic 3D game object, parent of all 3D-related nodes.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
var boneIdx: Int32
The index of the attached bone.
var boneName: String
The name of the attached bone.
var overridePose: Bool
Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to
true
, the BoneAttachment3D node can change the pose of the bone. When set tofalse
, the BoneAttachment3D will always be set to the bone’s transform.func getExternalSkeleton(
) -> NodePath Returns the
NodePath
to the externalSkeleton3D
node, if one has been set.func getUseExternalSkeleton(
) -> Bool Returns whether the BoneAttachment3D node is using an external
Skeleton3D
rather than attempting to use its parent node as theSkeleton3D
.func onSkeletonUpdate(
) A function that is called automatically when the
Skeleton3D
is updated. This function is where theBoneAttachment3D
node updates its position so it is correctly bound when it is not set to override the bone pose.func setExternalSkeleton(NodePath
) Sets the
NodePath
to the external skeleton that the BoneAttachment3D node should use. SeesetUseExternalSkeleton(_:)
to enable the externalSkeleton3D
node.func setUseExternalSkeleton(Bool
) Sets whether the BoneAttachment3D node will use an external
Skeleton3D
node rather than attempting to use its parent node as theSkeleton3D
. When set totrue
, the BoneAttachment3D node will use the externalSkeleton3D
node set insetExternalSkeleton(_:)
.