Skip to main content

ChiselSplineParticlesPooled

A class in Root.Township, the global namespace.

Client visual: the pooled spline particle line for the chisel, with rotation offsets on both ends and line alpha based on how well they line up.

Constructors​

MemberWhat it is
ChiselSplineParticlesPooled()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private float alignmentWeigthShare of the multiplier taken from alignment; the rest comes from distance.
private AnimationCurve alphaBasedOnAlignmentCurve from alignment to line alpha.
private float speedMultiplierScales the alignment multiplier.

Properties​

MemberWhat it is
Vector3 OriginPositionOverride { get; set; }World position the line starts from. Set by the caller.
Quaternion OriginRotation { get; set; }Extra rotation applied to the origin's forward.
Quaternion TargetRotation { get; set; }Extra rotation applied to the target's forward.
protected override float AlignmentMultiplier { get; }Base alignment multiplier times speedMultiplier. Also sets the line's alpha from alphaBasedOnAlignment.
protected override Vector3 OriginForward { get; }Origin's forward turned by OriginRotation.
protected override Vector3 OriginPosition { get; }Returns OriginPositionOverride instead of the origin's position.
protected override Vector3 TargetForward { get; }Target's forward turned by TargetRotation.

Methods​

MemberWhat it is
protected override void Awake()In play mode, gives the line renderer its own material copy so alpha changes don't affect others.
protected override float Multiplier()Blend of alignment and distance multipliers, weighted by alignmentWeigth.