Skip to main content

RotatedPositionHelper

A class in Root.Township, the global namespace.

Lays out a number of positions on an arc around a transform's forward axis. Used by ProfessionsProgressShrine to place its tree visuals.

Constructors​

MemberWhat it is
RotatedPositionHelper(Transform origin, int instancesCount, float spread, float radius, PositioningMode positionedMode = 0)Creates a RotatedPositionHelper from origin, instancesCount, spread, radius and positionedMode.

Properties​

MemberWhat it is
Vector3 CurrentPosition { get; }The origin's world position when the helper was made.
Vector3 ForwardAxis { get; }The origin's forward direction, the axis the arc turns around.
Quaternion Rotation { get; }A rotation looking along the forward axis with the origin's up.
Vector3 StartPosition { get; }Offset of the first instance from the origin, before stepping.
float Step { get; }Angle in degrees between instances, from the spread, the count and the positioning mode.
Vector3 UpAxis { get; }The origin's up direction.

Methods​

MemberWhat it is
Vector3 GetPosition(int index)Returns the world position of the instance at an index along the arc.