Skip to main content

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​

MemberWhat it is
Space(Quaternion rotation, Transform root, int layer)Creates a StaticObjectCombiner.Space from rotation, root and layer.

Fields​

6 private and internal fields
MemberWhat it is
private GameObject currentParentThe collider parent being filled now.
private readonly Vector3[] defaultXYZThe unrotated right, up and forward axes.
private readonly int layerLayer for the collider parent objects.
private readonly Transform rootTransform the collider parents are created under.
private readonly Quaternion rotationThe frame's rotation relative to the root.
private readonly Vector3[] xyzThe frame's right, up and forward axes after rotation.

Properties​

MemberWhat 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​

MemberWhat 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
MemberWhat 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: