A class in Root.Township, the global namespace.
On a player character, kicks the cloth bone rigidbodies against a teleport so cloth doesn't stretch across the jump. Ignores plain repositions.
Constructors
| Member | What it is |
|---|
ClothManager() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private Rigidbody[] clothBones | Cloth bone rigidbodies to adjust. |
private PlayerCharacter player | Backing field for Player. |
private float velocityMultiplier | Scale for the velocity given to the cloth bones. |
Properties
1 private and internal property
Methods
2 private and internal methods
| Member | What it is |
|---|
private void OnEnable() | Hooks the character's position-about-to-change event. |
private void PlayerAboutToTeleport(PlayerController player, Vector3 oldPosition, Vector3 newPosition, LocomotionFunction function) | Sets every cloth bone's velocity to the negative move times velocityMultiplier, unless it's a Reposition. |