Skip to main content

RandomRotationModifier

A class in Root.Township, the global namespace.

Forest fill modifier asset that spins each spawn around Y by a random angle, and can flip it upside down half the time.

Constructors​

MemberWhat it is
RandomRotationModifier()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

1 private and internal field
MemberWhat it is
private bool isFlippableAllows the random upside-down flip.

Methods​

MemberWhat it is
override void Filter(ForestFillCore.Setup setup, ref SpawnParameters point, ref float weight)Adds a random Y rotation, plus a 180 degree X flip on half the rolls if flippable.