Navigation
Unreal Engine C++ API Reference > Developer > SkeletalMeshUtilitiesCommon > FStaticToSkeletalMeshConverter > InitializeSkeletonFromStaticMesh
References
Module | SkeletalMeshUtilitiesCommon |
Header | /Engine/Source/Developer/SkeletalMeshUtilitiesCommon/Public/StaticToSkeletalMeshConverter.h |
Include | #include "StaticToSkeletalMeshConverter.h" |
Source | /Engine/Source/Developer/SkeletalMeshUtilitiesCommon/Private/StaticToSkeletalMeshConverter.cpp |
static bool InitializeSkeletonFromStaticMesh ( [USkeleton](API\Runtime\Engine\Animation\USkeleton) * InSkeleton, const [UStaticMesh](API\Runtime\Engine\Engine\UStaticMesh) * InStaticMesh, const FVector & InRelativeRootPosition, const FVector & InRelativeEndEffectorPosition, const int32 InIntermediaryJointCount )
Remarks
Creates a skeleton from a static mesh with a bone chain going from root to end effector, where the intermediary bones are distributed evenly along a line between the two. `true_ if the operation succeeded.
Parameters
Name | Description |
---|---|
InSkeleton | The skeleton to initialize. It has to be freshly created and contain no bones already. |
InStaticMesh | The static mesh whose bounding box will be used as a reference. |
InRelativeRootPosition | The relative root position in a unit cube that gets scaled up to match the bbox of the static mesh. For example, given FVector(0.5, 0.5, 0.0), the root bone location will be placed at the center of the bottom of the static mesh's bbox. |
InRelativeEndEffectorPosition | The end effector position, positioned in the same manner as the root position. If the end effector is in the same location as the root, only the root bone is created. |
InIntermediaryJointCount | Number of joints to create between the root and the end effector. |