ParentConstraint

csharp
public sealed class ParentConstraint : Behaviour

Namespace NodeWorld.Flux.

A parent constraint of the world (Unity's ParentConstraint): the object follows its sources, each with a weight. A script turns it on and off (enabled) and changes the weights; the sources themselves are set in the scene.

Properties

sourceCount

csharp
public int sourceCount { get; }

The number of sources the object follows.

Methods

GetSourceTransform

csharp
public Transform GetSourceTransform(int index)

The transform of source index (null if none).

GetSourceWeight

csharp
public float GetSourceWeight(int index)

The weight of source index.

SetSourceWeight

csharp
public void SetSourceWeight(int index, float weight)

Changes the weight of source index.