RandomizableTransformAdjustment

Class in ChivalrousGames.Common

Description

Configuration to adjust a Transform‘s local position, rotation and/or scale with the possibility of randomization.

Fields

adjustPosition bool If true, will use the positionAdjustment to adjust position
positionAdjustment RandomizableAdjustment The adjustment applied on the transform’s position
adjustRotation bool If true, will use the rotationAdjustment to adjust rotation
rotationAdjustment RotationAdjustment The adjustment applied on the transform’s rotation
adjustScale bool If true, will use the scaleAdjustment to adjust scale
scaleAdjustment ScaleAdjustment The adjustment applied on the transform’s scale

Methods

AdjustTransform
public void AdjustTransform(Transform transform, ChivalrousGames.Common.Random random);
Parameters
transform Transform The transform to adjust
random ChivalrousGames.Common.Random The random to use to select the random values
Description

Will apply adjustment to a Transform‘s local position, rotation and/or scale, depending on configurations. Randomization is applied only once on position, rotation and scale because of the usage of RandomizableAdjustment.

ClearRandomizedValues
public void ClearRandomizedValues();
Description

Will clear the randomization results of positionAdjustment, rotationAdjustment and scaleAdjustment allowing a new randomization to occur.