You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
854 B
C#
43 lines
854 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
namespace RootMotion.FinalIK {
|
|
|
|
/// <summary>
|
|
/// The base abstract class for all Transform constraints.
|
|
/// </summary>
|
|
[System.Serializable]
|
|
public abstract class Constraint {
|
|
|
|
#region Main Interface
|
|
|
|
/// <summary>
|
|
/// The transform to constrain.
|
|
/// </summary>
|
|
public Transform transform;
|
|
/// <summary>
|
|
/// %Constraint weight.
|
|
/// </summary>
|
|
public float weight;
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether this <see cref="Constraint"/> is valid.
|
|
/// </summary>
|
|
/// <value>
|
|
/// <c>true</c> if is valid; otherwise, <c>false</c>.
|
|
/// </value>
|
|
public bool isValid {
|
|
get {
|
|
return transform != null;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Updates the constraint.
|
|
/// </summary>
|
|
public abstract void UpdateConstraint();
|
|
|
|
#endregion Main Interface
|
|
}
|
|
}
|