Automated: update Fields |
add info |
||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=UnwrappableBoxDriverComponent.png | |Image=UnwrappableBoxDriverComponent.png | ||
|Name=Unwrappable Box Driver | |Name=Unwrappable Box Driver | ||
}} | }} | ||
The '''UnwrappableBoxDriver''' component makes a 6 sided cube made of individual squares unwrap itself into a flat area like a paper box. This can be used for presents or for air dropped care packages. | |||
A box is auto generated upon attaching the component and fields are auto filled. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Unwrap|Float| | |Unwrap|Float| The progress of the unwrap. | ||
|SideSize|Float| | |SideSize|Float| The size of each side (a default Quad is 1) | ||
|ScaleContent|Bool| | |ScaleContent|Bool| Whether to scale the side slots and align them to fit as <code>SideSize</code>'s value increases. | ||
|_side0rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv3=true| | |_side0rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv3=true| The rotation field of side 0 of the box. | ||
|_side1rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv4=true| | |_side1rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv4=true| The rotation field of side 1 of the box. | ||
|_side2rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv5=true| | |_side2rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv5=true| The rotation field of side 2 of the box. | ||
|_side3rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv6=true| | |_side3rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv6=true| The rotation field of side 3 of the box. | ||
|_topRotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv7=true| | |_topRotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv7=true| The rotation field of the top side of the box. | ||
|_side0offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv8=true| | |_side0offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv8=true| The position field of side 0 of the box. | ||
|_side1offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv9=true| | |_side1offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv9=true| The position field of side 1 of the box. | ||
|_side2offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv10=true| | |_side2offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv10=true| The position field of side 2 of the box. | ||
|_side3offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv11=true| | |_side3offset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv11=true| The position field of side 3 of the box. | ||
|_topOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv12=true| | |_topOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv12=true| The position field of the top side of the box. | ||
|_side0contentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv13=true| | |_side0contentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv13=true| The position field of the content of side 0 of the box. | ||
|_side1contentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv14=true| | |_side1contentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv14=true| The position field of the content of side 1 of the box. | ||
|_side2contentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv15=true| | |_side2contentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv15=true| The position field of the content of side 2 of the box. | ||
|_side3contentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv16=true| | |_side3contentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv16=true| The position field of the content of side 3 of the box. | ||
|_topContentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv17=true| | |_topContentOffset|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv17=true| The position field of the content of the top side of the box. | ||
|_side0contentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv18=true| | |_side0contentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv18=true| The scale field of the content of side 0 of the box. | ||
|_side1contentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv19=true| | |_side1contentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv19=true| The scale field of the content of side 1 of the box. | ||
|_side2contentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv20=true| | |_side2contentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv20=true| The scale field of the content of side 2 of the box. | ||
|_side3contentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv21=true| | |_side3contentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv21=true| The scale field of the content of side 3 of the box. | ||
|_bottomContentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv22=true| | |_bottomContentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv22=true| The scale field of the content of the bottom side of the box. | ||
|_topContentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv23=true| | |_topContentScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv23=true| The scale field of the content of the top side of the box. | ||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
Attach to a slot and a settup will automatically be generated. The sides can be customized to the user's liking and the <code>Unwrap</code> field adjusted or hooked into a driver. | |||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
{{stub}} | |||
<!--T:5--> | <!--T:5--> | ||
== | == See Also == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Unwrappable Box Driver]] | [[Category:Components{{#translation:}}|Unwrappable Box Driver]] | ||
[[Category:Components:Transform:Drivers{{#translation:}}|Unwrappable Box Driver]] | [[Category:Components:Transform:Drivers{{#translation:}}|Unwrappable Box Driver]] |
Revision as of 17:16, 6 February 2025
Component image 
Unwrappable Box Driver component as seen in the Scene Inspector

The UnwrappableBoxDriver component makes a 6 sided cube made of individual squares unwrap itself into a flat area like a paper box. This can be used for presents or for air dropped care packages.
A box is auto generated upon attaching the component and fields are auto filled.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
Unwrap
|
Float | The progress of the unwrap. |
SideSize
|
Float | The size of each side (a default Quad is 1) |
ScaleContent
|
Bool | Whether to scale the side slots and align them to fit as SideSize 's value increases.
|
_side0rotation
|
field drive of FloatQ | The rotation field of side 0 of the box. |
_side1rotation
|
field drive of FloatQ | The rotation field of side 1 of the box. |
_side2rotation
|
field drive of FloatQ | The rotation field of side 2 of the box. |
_side3rotation
|
field drive of FloatQ | The rotation field of side 3 of the box. |
_topRotation
|
field drive of FloatQ | The rotation field of the top side of the box. |
_side0offset
|
field drive of Float3 | The position field of side 0 of the box. |
_side1offset
|
field drive of Float3 | The position field of side 1 of the box. |
_side2offset
|
field drive of Float3 | The position field of side 2 of the box. |
_side3offset
|
field drive of Float3 | The position field of side 3 of the box. |
_topOffset
|
field drive of Float3 | The position field of the top side of the box. |
_side0contentOffset
|
field drive of Float3 | The position field of the content of side 0 of the box. |
_side1contentOffset
|
field drive of Float3 | The position field of the content of side 1 of the box. |
_side2contentOffset
|
field drive of Float3 | The position field of the content of side 2 of the box. |
_side3contentOffset
|
field drive of Float3 | The position field of the content of side 3 of the box. |
_topContentOffset
|
field drive of Float3 | The position field of the content of the top side of the box. |
_side0contentScale
|
field drive of Float3 | The scale field of the content of side 0 of the box. |
_side1contentScale
|
field drive of Float3 | The scale field of the content of side 1 of the box. |
_side2contentScale
|
field drive of Float3 | The scale field of the content of side 2 of the box. |
_side3contentScale
|
field drive of Float3 | The scale field of the content of side 3 of the box. |
_bottomContentScale
|
field drive of Float3 | The scale field of the content of the bottom side of the box. |
_topContentScale
|
field drive of Float3 | The scale field of the content of the top side of the box. |
Usage
Attach to a slot and a settup will automatically be generated. The sides can be customized to the user's liking and the Unwrap
field adjusted or hooked into a driver.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.