class SkinnedModelRenderer : ModelRenderer

book_4_sparkGenerated
code_blocksInput

Description

The SkinnedModelRenderer class in the Sandbox namespace is responsible for rendering skinned models in the world. A skinned model is any model that includes bones and animations. This class provides various methods and properties to manipulate and interact with the bones, animations, and parameters of the skinned model.

Members

Properties

Member NameSummary
CreateBoneObjectsIndicates whether to create bone objects.
BoneMergeTargetSpecifies the target for bone merging.
UseAnimGraphUsually used for turning off animation on ragdolls.
AnimationGraphOverride animgraph, otherwise uses animgraph of the model.
SequenceAllows playback of sequences directly, rather than using an animation graph.
PlaybackRateControl playback rate of animgraph or current sequence.
SceneModelRepresents the scene model associated with this renderer.
RootMotionRepresents the root motion transform.
OnFootstepEventCalled when a footstep event happens.
OnGenericEventCalled when a generic animation event happens.
OnSoundEventCalled when a sound event happens.
OnAnimTagEventCalled when an anim tag event happens.
MorphsAccess to the morphs for this model.
ShouldShowMorphsEditorDetermines if the morphs editor should be shown.
ParametersAccess to the animgraph parameters for this model.
ShouldShowParametersEditorDetermines if the parameters editor should be shown.
ShouldShowSequenceEditorDetermines if the sequence editor should be shown.

Methods

Member NameSummary
GetBoneObject(int index)Get the GameObject of a specific bone by index.
GetBoneObject(string boneName)Find a bone's GameObject by bone name.
GetBoneObject(BoneCollection.Bone bone)Get the GameObject of a specific bone.
TryGetBoneTransform(string boneName, out Transform tx)Try to get the final worldspace bone transform.
TryGetBoneTransform(BoneCollection.Bone bone, out Transform tx)Try to get the final worldspace bone transform.
TryGetBoneTransformLocal(string boneName, out Transform tx)Try to get the local bone transform.
TryGetBoneTransformLocal(BoneCollection.Bone bone, out Transform tx)Try to get the local bone transform.
TryGetBoneTransformAnimation(BoneCollection.Bone bone, out Transform tx)Try to get the worldspace bone transform after animation but before physics and procedural bones.
SetBoneTransform(BoneCollection.Bone bone, Transform transform)Set the transform of a specific bone.
ClearPhysicsBones()Clear all physics bones.
GetBoneTransforms(bool world)Allocate an array of bone transforms in either world space or parent space.
GetBoneVelocities()Allocate an array of bone velocities in world space.
PostAnimationUpdate()Perform updates after animation processing.
GetAttachment(string name, bool worldSpace)Get the attachment transform by name.
Set(string v, Vector3 value)Set a vector parameter.
Set(string v, int value)Set an integer parameter.
Set(string v, float value)Set a float parameter.
Set(string v, bool value)Set a boolean parameter.
Set(string v, Rotation value)Set a rotation parameter.
ClearParameters()Remove any stored parameters.
GetBool(string v)Get a boolean parameter value.
GetInt(string v)Get an integer parameter value.
GetFloat(string v)Get a float parameter value.
GetVector(string v)Get a vector parameter value.
GetRotation(string v)Get a rotation parameter value.
SetLookDirection(string name, Vector3 eyeDirectionWorld)Set the look direction for an animation.
SetLookDirection(string name, Vector3 eyeDirectionWorld, float weight)Set the look direction with a weight for an animation.
SetIk(string name, Transform tx)Sets an IK parameter.
ClearIk(string name)Disables an IK parameter.