Class RiggingModule
Animates rigged vehicle models by moving their bones procedurally.
Inherited Members
Namespace: NWH.VehiclePhysics2.Modules.Rigging
Assembly: NWH.VehiclePhysics2.dll
Syntax
[Serializable]
public class RiggingModule : VehicleComponent
Remarks
Drives bone transforms from the physics state each frame: control arms, axles and driveshafts, tie rods, shock bodies. Each entry in bones is one animated element, with its own transform, target transform or pair of targets, and LookAt and stretch options. See https://nwhcoding.com/VehiclePhysics/manual/RiggingModule.html
Fields
bones
List of bones to be animated by the rigging system.
Declaration
public List<Bone> bones
Field Value
| Type | Description |
|---|---|
| List<Bone> |
Methods
VC_Initialize()
Initializes all bones in the rigging system.
Declaration
protected override void VC_Initialize()
Overrides
Remarks
Each bone caches its authored distance and scale here; stretching is measured against it.
VC_Update(float)
Updates all bone transforms based on their target positions.
Declaration
public override void VC_Update(float DeltaTime)
Parameters
| Type | Name | Description |
|---|---|---|
| float | DeltaTime | Frame delta time in seconds. |
Overrides
Remarks
Per bone: move to the target position (or the midpoint of two, for a double-sided bone), apply the LookAt rotation if enabled, then stretch to the target distance. The vehicle up vector is passed in so the roll reference follows the body.