public sealed class Sandbox.SkinnedModelRenderer : Sandbox.ModelRenderer
Renders a skinned model in the world. A skinned model is any model with bones/animations.
Related Guides
Broader workflow and conceptual references connected to this API.
If you want a specific file/asset type to have a custom Thumbnail/Inspector Preview, you can simply create an AssetPreview. An AssetPreview initializes a SceneWorld and SceneCamera, rendering the Camera to the Preview output, so all you need to do is populate it and/or position the Camera to your liking.
You can broadcast and listen to events in your scene using interfaces.
A scene can contain systems that need to do work in specific places during the frame.
You can create links by adding a NavMeshLink Component to an GameObject.
Facepunch provides some ready-to-use first-person weapons for you!
You can animate skinned characters directly in the editor using Movie Maker. This tutorial covers:
Constructors
Showing 1 constructors
public SkinnedModelRenderer()
No results match this filter.
Methods
Showing 30 methods
public void ClearIk(string name)
This sets ik.{name}.enabled to false.
public void ClearParameters()
Remove any stored parameters
public void ClearPhysicsBones()
public System.Nullable`1<Transform> GetAttachment(string name, bool worldSpace = True)
Parameters
worldSpace: Default: True
public Transform[] GetBoneTransforms(bool world)
Allocate an array of bone transforms in either world space or parent space.
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
public bool GetBool(string v)
public float GetFloat(string v)
public int GetInt(string v)
public Rotation GetRotation(string v)
public Vector3 GetVector(string v)
public void PostAnimationUpdate()Obsolete
Obsolete: This API member is obsolete.
public void SetBoneTransform(Sandbox.BoneCollection.Bone bone, Transform transform)
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
public bool TryGetBoneTransformAnimation(Sandbox.BoneCollection.Bone bone, Transform tx)
Try to get the worldspace bone transform after animation but before physics and procedural bones.
No results match this filter.
Properties
Showing 18 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 bool Sandbox.SkinnedModelRenderer.CreateBoneObjects { get; set; }
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.
public float Sandbox.SkinnedModelRenderer.PlaybackRate { get; set; }
Control playback rate of animgraph or current sequence.
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; }
public bool Sandbox.SkinnedModelRenderer.ShouldShowParametersEditor { get; set; }
public bool Sandbox.SkinnedModelRenderer.ShouldShowSequenceEditor { get; set; }
public bool Sandbox.SkinnedModelRenderer.UseAnimGraph { get; set; }
Usually used for turning off animation on ragdolls.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.SkinnedModelRenderer |