SkinnedModelRendererclass
Renders a skinned model in the world. A skinned model is any model with bones/animations.
Constructors1
Showing 1 constructors
public SkinnedModelRenderer()
No results match this filter.
Methods30
Showing 30 methods
public void ClearIk(string name)
This sets ik.{name}.enabled to false.
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
void—public void ClearParameters()
Remove any stored parameters
void—public void ClearPhysicsBones()
void—public System.Nullable`1<Transform> GetAttachment(string name, bool worldSpace = True)
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| worldSpace = True | bool | — |
public Transform[] GetBoneTransforms(bool world)
Allocate an array of bone transforms in either world space or parent space.
| Parameter | Type | Description |
|---|---|---|
| world | bool | — |
public Sandbox.SkinnedModelRenderer.BoneVelocity[] GetBoneVelocities()
Allocate an array of bone velocities in world space
public Sandbox.SkinnedModelRenderer.BoneVelocity GetBoneVelocity(int boneIndex)
Retrieve the bone's velocities based on previous and current position
| Parameter | Type | Description |
|---|---|---|
| boneIndex | int | — |
public bool GetBool(string v)
| Parameter | Type | Description |
|---|---|---|
| v | string | — |
bool—public float GetFloat(string v)
| Parameter | Type | Description |
|---|---|---|
| v | string | — |
float—public int GetInt(string v)
| Parameter | Type | Description |
|---|---|---|
| v | string | — |
int—public void PostAnimationUpdate()
Obsolete: This API member is obsolete.
void—public void SetBoneTransform(Sandbox.BoneCollection.Bone bone, Transform transform)
| Parameter | Type | Description |
|---|---|---|
| bone | Bone | — |
| transform | Transform | — |
void—public void 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
| Parameter | Type | Description |
|---|---|---|
| name | string | — |
| tx | Transform | — |
void—public bool TryGetBoneTransformAnimation(Sandbox.BoneCollection.Bone bone, Transform tx)
Try to get the worldspace bone transform after animation but before physics and procedural bones.
| Parameter | Type | Description |
|---|---|---|
| bone | Bone | — |
| tx | Transform | — |
bool—No results match this filter.
Properties20
Showing 20 properties
public Sandbox.AnimationGraph Sandbox.SkinnedModelRenderer.AnimationGraph { get; set; }
Override animgraph, otherwise uses animgraph of the model.
public Sandbox.SkinnedModelRenderer Sandbox.SkinnedModelRenderer.BoneMergeTarget { get; set; }
public System.ReadOnlySpan`1<Transform> Sandbox.SkinnedModelRenderer.BoneWorldTransforms { get; set; }
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.
public bool Sandbox.SkinnedModelRenderer.CreateBoneObjects { get; set; }
bool—public Sandbox.SkinnedModelRenderer.MorphAccessor Sandbox.SkinnedModelRenderer.Morphs { get; set; }
Access to the morphs for this model
public System.Action`1<Sandbox.SceneModel.AnimTagEvent> Sandbox.SkinnedModelRenderer.OnAnimTagEvent { get; set; }
Called when an anim tag event happens
public System.Action`1<Sandbox.SceneModel.FootstepEvent> Sandbox.SkinnedModelRenderer.OnFootstepEvent { get; set; }
Called when a footstep event happens
public System.Action`1<Sandbox.SceneModel.GenericEvent> Sandbox.SkinnedModelRenderer.OnGenericEvent { get; set; }
Called when a generic animation event happens
public System.Action`1<Sandbox.SceneModel.SoundEvent> Sandbox.SkinnedModelRenderer.OnSoundEvent { get; set; }
Called when a sound event happens
public Sandbox.SkinnedModelRenderer.ParameterAccessor Sandbox.SkinnedModelRenderer.Parameters { get; set; }
Access to the animgraph parameters for this model
public bool Sandbox.SkinnedModelRenderer.PlayAnimationsInEditorScene { get; set; }
If true then animations will play while in an editor scene.
bool—public float Sandbox.SkinnedModelRenderer.PlaybackRate { get; set; }
Control playback rate of animgraph or current sequence.
float—public System.ReadOnlySpan`1<Transform> Sandbox.SkinnedModelRenderer.PreviousBoneWorldTransforms { get; set; }
Last frame's final world-space bone transforms - the counterpart to `Sandbox.SkinnedModelRenderer.BoneWorldTransforms`, so consumers can tell how each bone moved this frame without tracking it themselves.
public Transform Sandbox.SkinnedModelRenderer.RootMotion { get; set; }
public Sandbox.SceneModel Sandbox.SkinnedModelRenderer.SceneModel { get; set; }
public Sandbox.SkinnedModelRenderer.SequenceAccessor Sandbox.SkinnedModelRenderer.Sequence { get; set; }
Allows playback of sequences directly, rather than using an animation graph. Requires `Sandbox.SkinnedModelRenderer.UseAnimGraph` disabled if the scene model has one.
public bool Sandbox.SkinnedModelRenderer.ShouldShowMorphsEditor { get; set; }
bool—public bool Sandbox.SkinnedModelRenderer.ShouldShowParametersEditor { get; set; }
bool—public bool Sandbox.SkinnedModelRenderer.ShouldShowSequenceEditor { get; set; }
bool—public bool Sandbox.SkinnedModelRenderer.UseAnimGraph { get; set; }
Usually used for turning off animation on ragdolls.
bool—No results match this filter.