Component:UnwrappableBoxDriver: Difference between revisions

From Resonite Wiki
add info
Reword
 
Line 6: Line 6:
|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.
The '''UnwrappableBoxDriver''' component makes a 6 sided cube made of individual quads that unwrap themselves into a flat area like a paper box.  


A box is auto generated upon attaching the component and fields are auto filled.
A box is auto generated upon attaching the component and fields are auto filled.
This can be used for presents or crates.


<!--T:2-->
<!--T:2-->
Line 41: Line 43:
<!--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.
Attach to a slot and a box will automatically be generated and setup. 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-->

Latest revision as of 21:21, 13 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 quads that unwrap themselves into a flat area like a paper box.

A box is auto generated upon attaching the component and fields are auto filled.

This can be used for presents or crates.

Fields

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 box will automatically be generated and setup. 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.


See Also