Skip to main content

NetworkStarer.RotatingStructure

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

A chain of neck joints that NetworkStarer bends towards its target, each joint taking up to its own maximum angle.

Constructors​

MemberWhat it is
RotatingStructure()Creates a NetworkStarer.RotatingStructure with default values.

Fields​

1 private and internal field
MemberWhat it is
private NetworkStarer.RotatingJoint[] jointsThe joints in the chain, first joint first.

Properties​

MemberWhat it is
NetworkStarer.RotatingJoint Base { get; }The last joint in the chain.
int JointLength { get; private set; }How many joints are in the chain.
float MaxAngle { get; private set; }The total angle the chain can turn: the sum of every joint's maximum.
Transform Root { get; private set; }The transform of the first joint.

Methods​

MemberWhat it is
void Initialize()Records each joint's starting rotation and sums their maximum angles. Called from NetworkStarer.Awake.
bool Rotate(Vector3 headDirection)Spreads the turn towards a direction along the joints. Returns true if the turn needed more than all joints allow.

Used in​

Members of other types that take, return or hold a RotatingStructure: