class SkinnedModelRenderer : ModelRenderer

robot_2Generated
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 parameter with a Vector3 value.
Set(string v, int value)Set a parameter with an integer value.
Set(string v, float value)Set a parameter with a float value.
Set(string v, bool value)Set a parameter with a boolean value.
Set(string v, Rotation value)Set a parameter with a Rotation value.
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 Vector3 parameter value.
GetRotation(string v)Get a Rotation parameter value.
SetLookDirection(string name, Vector3 eyeDirectionWorld)Converts value to vector local to this entity's eyepos and passes it to SetAnimVector.
SetLookDirection(string name, Vector3 eyeDirectionWorld, float weight)Converts value to vector local to this entity's eyepos and passes it to SetAnimVector. This also sets {name}_weight to the weight value.
SetIk(string name, Transform tx)Sets an IK parameter. This sets 3 variables that should be set in the animgraph: 1. ik.{name}.enabled 2. ik.{name}.position 3. ik.{name}.rotation
ClearIk(string name)This sets ik.{name}.enabled to false.