StaticObjectCombiner.Space
A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
A rotation frame used when flattening primitive colliders: box and capsule colliders aligned to it are rebuilt on one shared parent object.
Constructors
| Member | What it is |
|---|
Space(Quaternion rotation, Transform root, int layer) | Creates a StaticObjectCombiner.Space from rotation, root and layer. |
Fields
6 private and internal fields
| Member | What it is |
|---|
private GameObject currentParent | The collider parent being filled now. |
private readonly Vector3[] defaultXYZ | The unrotated right, up and forward axes. |
private readonly int layer | Layer for the collider parent objects. |
private readonly Transform root | Transform the collider parents are created under. |
private readonly Quaternion rotation | The frame's rotation relative to the root. |
private readonly Vector3[] xyz | The frame's right, up and forward axes after rotation. |
Properties
| Member | What it is |
|---|
GameObject Parent { get; } | Current collider parent object. Starts a new one once the current has more than 300 colliders. |
Matrix4x4 ParentToThis { get; } | Matrix that rotates from the root's space into this frame. |
Methods
| Member | What it is |
|---|
int GetDirection(Vector3 direction) | Returns which of the frame's axes (0, 1, 2) a direction lies along, or -1. |
bool IsAligned(Quaternion rotation) | True if a rotation's axes line up with this frame's axes, so its colliders can share the parent. |
1 private and internal method
| Member | What it is |
|---|
private void GetNewParent() | Creates a new collider parent object under the root, on this frame's layer and rotation. |
Used in
Members of other types that take, return or hold a Space: