Summary
An sample of how to use Animation Jobs in Animancer to apply physics based damping to certain bones.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.Samples .Jobs - Base Types
-
- MonoBehaviour
graph BT
Type-->Base0["MonoBehaviour"]
Type["Damping"]
class Type type-node
Syntax
[AddComponentMenu(Strings.SamplesMenuPrefix + "Jobs - Damping")]
[AnimancerHelpUrl(typeof(Damping))]
public class Damping : MonoBehaviour
Remarks
This sample is based on Unity's
Animation Jobs Samples.
This script sets up the job in place of
Damping.cs.
The
Animancer.Samples.Jobs.DampingJob
script is almost identical to the original
DampingJob.cs.
The Animation Rigging package
has a damping system which is likely better than this sample.
Sample:
Damping
Attributes
Type | Description |
---|---|
AddComponentMenu | |
Animancer |
[Assert-Conditional]
A UnityEngine.HelpURLAttribute which points to Animancer's documentation.
|
Methods
Name | Value | Summary |
---|---|---|
Awake |
void | |
OnValidate |
void |
Ensures that the
Animancer.Samples.Jobs.Damping._BoneCount is positive and not larger than the number of bones between the
Animancer.Samples.Jobs.Damping._EndBone and the UnityEngine.Animator .
|