|LerpSpeed|Float| How fast the items should move to align themselves in the specified grid arrangement.
|LerpSpeed|Float| How fast the items should move to align themselves in the specified grid arrangement.
|HorizontalAlignment|'''[[#Align|Align]]'''|TypeAdv4=true| How to align the items horizontally.
|HorizontalAlignment|'''[[#Align|ObjectGridAligner.Align]]'''|TypeAdv5=true| How to align the items horizontally.
|VerticalAlignment|'''[[#Align|Align]]'''|TypeAdv5=true| How to align the items vertically.
|VerticalAlignment|'''[[#Align|ObjectGridAligner.Align]]'''|TypeAdv6=true| How to align the items vertically.
|RowAxis|'''[[#AxisDir|AxisDir]]'''|TypeAdv6=true| The axis that items should be aligned on for the horizontal axis of the grid.
|RowAxis|'''[[#AxisDir|ObjectGridAligner.AxisDir]]'''|TypeAdv7=true| The axis that items should be aligned on for the horizontal axis of the grid.
|ColumnAxis|'''[[#AxisDir|AxisDir]]'''|TypeAdv7=true| The axis that items should be aligned on for the vertical axis of the grid.
|ColumnAxis|'''[[#AxisDir|ObjectGridAligner.AxisDir]]'''|TypeAdv8=true| The axis that items should be aligned on for the vertical axis of the grid.
|Items|{{RootFieldType|SyncList`1|[[#Item|Item]]}}|TypeAdv8=true| A list of items who's positions should be driven to place them into a grid alignment using this component's calculations.
|Items|{{RootFieldType|SyncList`1|[[#Item|ObjectGridAligner.Item]]}}|TypeAdv9=true| A list of items who's positions should be driven to place them into a grid alignment using this component's calculations.
}}
}}
Line 26:
Line 27:
Controls how the items should align themselves along the axis specified by the component.
Controls how the items should align themselves along the axis specified by the component.
{{Table EnumValues
{{Table EnumValues
|Neg|?| Aligns items so their values are always negative along the specified alignment axis (so if using x axis, x will always be negative for an item)
|Neg|0| Aligns items so their values are always negative along the specified alignment axis (so if using x axis, x will always be negative for an item)
|Pos|?| Aligns items so their values are always positive along the specified alignment axis (so if using x axis, x will always be positive for an item)
|Mid|1| Aligns items so half are on the negative and half are on the positive along an axis, so they take up both directions equally.
|Mid|?| Aligns items so half are on the negative and half are on the positive along an axis, so they take up both directions equally.
|Pos|2| Aligns items so their values are always positive along the specified alignment axis (so if using x axis, x will always be positive for an item)
}}
}}
Line 34:
Line 35:
{{stub}}
{{stub}}
{{Table EnumValues
{{Table EnumValues
|Xpos|0| Align items along the positive x axis.
|Xneg|1| Align items along the negative x axis.
|Ypos|2| Align items along the positive y axis.
|Yneg|3| Align items along the negative y axis.
|Zpos|4| Align items along the positive z axis.
|Zneg|5| Align items along the negative z axis.
}}
}}
== Item ==
== Item ==
{{stub}}
{{Table TypeFields
{{Table TypeFields
|Root|Slot| The slot to align.
|PositionDrive|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv1=true| The position field of <code>Root</code>.
}}
}}
<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Can be used for aligning tiles, shelves, boxes, or anything that needs consistent alignment.
A list of items who's positions should be driven to place them into a grid alignment using this component's calculations.
Align
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Controls how the items should align themselves along the axis specified by the component.
Values
Name
Value
Description
Neg
0
Aligns items so their values are always negative along the specified alignment axis (so if using x axis, x will always be negative for an item)
Mid
1
Aligns items so half are on the negative and half are on the positive along an axis, so they take up both directions equally.
Pos
2
Aligns items so their values are always positive along the specified alignment axis (so if using x axis, x will always be positive for an item)
AxisDir
This article or section is a Stub. You can help the Resonite Wiki by expanding it.