TransformAdjustment

Class in ChivalrousGames.Common

Description

Configuration to adjust a Transform‘s local position, rotation and/or scale.

Fields

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

Methods

AdjustTransform
public void AdjustTransform(Transform transform, bool forceReset = true);
Parameters
transform Transform The transform to adjust
forceReset bool Optional
If set to true and not adjusting either position, rotation or scale, then position, rotation or scaled will be set to default values.
Description

Will apply adjustment to a Transform‘s local position, rotation and/or scale, depending on configurations.

AdjustTransform
public void AdjustTransform(Transform transform, bool addToCurrent, bool forceReset);
Parameters
transform Transform The transform to adjust
addToCurrent bool If set to true the adjustment will added to the current transform value. If set to false the adjustment will replace the current transform value.
forceReset bool If set to true and not adjusting either position, rotation or scale, then position, rotation or scaled will be set to default values.
Description

Will apply adjustment to a Transform‘s local position, rotation and/or scale, depending on configurations.