# Sandbox.SkinnedModelRenderer

Renders a skinned model in the world. A skinned model is any model with bones/animations.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.ModelRenderer](/api/Sandbox.ModelRenderer)
- Modifiers: sealed

## Constructors

- [`SkinnedModelRenderer`](/api/Sandbox.SkinnedModelRenderer/.ctor)

## Properties

- [`AnimationGraph`](/api/Sandbox.SkinnedModelRenderer/AnimationGraph): Override animgraph, otherwise uses animgraph of the model.
- [`BoneMergeTarget`](/api/Sandbox.SkinnedModelRenderer/BoneMergeTarget)
- [`BoneWorldTransforms`](/api/Sandbox.SkinnedModelRenderer/BoneWorldTransforms): This frame's final world-space bone transforms, cached so repeated callers - and parallel readers - share a single skeleton read instead of each fetching bones one at a time. Rebuilt at most once per frame. The returned data is shared and must not be mutated. Empty if there's no valid model.
- [`CreateBoneObjects`](/api/Sandbox.SkinnedModelRenderer/CreateBoneObjects)
- [`Morphs`](/api/Sandbox.SkinnedModelRenderer/Morphs): Access to the morphs for this model
- [`OnAnimTagEvent`](/api/Sandbox.SkinnedModelRenderer/OnAnimTagEvent): Called when an anim tag event happens
- [`OnFootstepEvent`](/api/Sandbox.SkinnedModelRenderer/OnFootstepEvent): Called when a footstep event happens
- [`OnGenericEvent`](/api/Sandbox.SkinnedModelRenderer/OnGenericEvent): Called when a generic animation event happens
- [`OnSoundEvent`](/api/Sandbox.SkinnedModelRenderer/OnSoundEvent): Called when a sound event happens
- [`Parameters`](/api/Sandbox.SkinnedModelRenderer/Parameters): Access to the animgraph parameters for this model
- [`PlayAnimationsInEditorScene`](/api/Sandbox.SkinnedModelRenderer/PlayAnimationsInEditorScene): If true then animations will play while in an editor scene.
- [`PlaybackRate`](/api/Sandbox.SkinnedModelRenderer/PlaybackRate): Control playback rate of animgraph or current sequence.
- [`PreviousBoneWorldTransforms`](/api/Sandbox.SkinnedModelRenderer/PreviousBoneWorldTransforms): Last frame's final world-space bone transforms - the counterpart to [Sandbox.SkinnedModelRenderer.BoneWorldTransforms](/api/Sandbox.SkinnedModelRenderer/BoneWorldTransforms), so consumers can tell how each bone moved this frame without tracking it themselves.
- [`RootMotion`](/api/Sandbox.SkinnedModelRenderer/RootMotion)
- [`SceneModel`](/api/Sandbox.SkinnedModelRenderer/SceneModel)
- [`Sequence`](/api/Sandbox.SkinnedModelRenderer/Sequence): Allows playback of sequences directly, rather than using an animation graph. Requires [Sandbox.SkinnedModelRenderer.UseAnimGraph](/api/Sandbox.SkinnedModelRenderer/UseAnimGraph) disabled if the scene model has one.
- [`ShouldShowMorphsEditor`](/api/Sandbox.SkinnedModelRenderer/ShouldShowMorphsEditor)
- [`ShouldShowParametersEditor`](/api/Sandbox.SkinnedModelRenderer/ShouldShowParametersEditor)
- [`ShouldShowSequenceEditor`](/api/Sandbox.SkinnedModelRenderer/ShouldShowSequenceEditor)
- [`UseAnimGraph`](/api/Sandbox.SkinnedModelRenderer/UseAnimGraph): Usually used for turning off animation on ragdolls.

## Methods

- [`ClearIk`](/api/Sandbox.SkinnedModelRenderer/ClearIk): This sets ik.{name}.enabled to false.
- [`ClearParameters`](/api/Sandbox.SkinnedModelRenderer/ClearParameters): Remove any stored parameters
- [`ClearPhysicsBones`](/api/Sandbox.SkinnedModelRenderer/ClearPhysicsBones)
- [`GetAttachment`](/api/Sandbox.SkinnedModelRenderer/GetAttachment)
- [`GetBoneObject`](/api/Sandbox.SkinnedModelRenderer/GetBoneObject): Get the GameObject of a specific bone.
- [`GetBoneTransforms`](/api/Sandbox.SkinnedModelRenderer/GetBoneTransforms): Allocate an array of bone transforms in either world space or parent space.
- [`GetBoneVelocities`](/api/Sandbox.SkinnedModelRenderer/GetBoneVelocities): Allocate an array of bone velocities in world space
- [`GetBoneVelocity`](/api/Sandbox.SkinnedModelRenderer/GetBoneVelocity): Retrieve the bone's velocities based on previous and current position
- [`GetBool`](/api/Sandbox.SkinnedModelRenderer/GetBool)
- [`GetClosestBone`](/api/Sandbox.SkinnedModelRenderer/GetClosestBone): The bone closest to a world position, or null when there's no model. Resolved natively in one call - nothing is allocated or copied. Use for sticking things to the nearest bone (impact decals, gibs).
- [`GetFloat`](/api/Sandbox.SkinnedModelRenderer/GetFloat)
- [`GetInt`](/api/Sandbox.SkinnedModelRenderer/GetInt)
- [`GetRotation`](/api/Sandbox.SkinnedModelRenderer/GetRotation)
- [`GetVector`](/api/Sandbox.SkinnedModelRenderer/GetVector)
- [`PostAnimationUpdate`](/api/Sandbox.SkinnedModelRenderer/PostAnimationUpdate)
- [`Set`](/api/Sandbox.SkinnedModelRenderer/Set)
- [`SetBoneTransform`](/api/Sandbox.SkinnedModelRenderer/SetBoneTransform)
- [`SetIk`](/api/Sandbox.SkinnedModelRenderer/SetIk): 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
- [`SetLookDirection`](/api/Sandbox.SkinnedModelRenderer/SetLookDirection): Converts value to vector local to this entity's eyepos and passes it to SetAnimVector
- [`SpeakSound`](/api/Sandbox.SkinnedModelRenderer/SpeakSound): Play a sound as this model's voice. On top of regular sound playback, the model will lipsync to it - if the sound has a viseme track (authored in the sound editor) we play that back, otherwise the audio is analyzed as it plays. Either way the mouth moves, assuming the model has viseme morphs.
- [`TryGetBoneTransform`](/api/Sandbox.SkinnedModelRenderer/TryGetBoneTransform): Try to get the final worldspace bone transform.
- [`TryGetBoneTransformAnimation`](/api/Sandbox.SkinnedModelRenderer/TryGetBoneTransformAnimation): Try to get the worldspace bone transform after animation but before physics and procedural bones.
- [`TryGetBoneTransformLocal`](/api/Sandbox.SkinnedModelRenderer/TryGetBoneTransformLocal)
