Component:BoxGizmo: Difference between revisions

From Resonite Wiki
fix
add info
 
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=BoxGizmoComponent.png
|Image=BoxGizmoComponent.png
|Name=Box Gizmo
|Name=Box Gizmo
}}
}}
The '''BoxGizmo''' component is used to make the handles and visual for editing a box mesh or collider, and also handles the interaction with the handles.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|TargetSlot|Slot|
|TargetSlot|Slot| The slot of the box to edit.
|BoxCenterSpace|{{RootFieldType|RootSpace}}|TypeAdv1=true| The coordinate space to transform by when making the result of <code>BoxCenter</code>
|BoxCenterSpace|{{RootFieldType|RootSpace}}|TypeAdv1=true| The coordinate space to transform by when making the result of <code>BoxCenter</code>
|BoxSizeSpace|{{RootFieldType|RootSpace}}|TypeAdv2=true| The coordinate space to transform by when making the result of <code>BoxSize</code>
|BoxSizeSpace|{{RootFieldType|RootSpace}}|TypeAdv2=true| The coordinate space to transform by when making the result of <code>BoxSize</code>
|BoxSize|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv3=true|
|BoxSize|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv3=true| The field to edit for the box size.
|BoxCenter|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv4=true|
|BoxCenter|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv4=true| The field to drive for the box center.
|LockOffset|Bool|
|LockOffset|Bool| Whether to lock the offset of the box so it's center stays the same.
|_vertices|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv6=true|
|_vertices|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv6=true| A list of fields to drive for the vertex positions of the cube gizmo visual.
|_edges|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv7=true|
|_edges|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv7=true| A list of fields to drive for the edge positions of the cube gizmo visual.
|_faces|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv8=true|
|_faces|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:Float3|Float3]]&gt;}}|TypeAdv8=true| A list of fields to drive for the face positions of the cube gizmo visual.
|_sphereColliderRadii|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:Float|Float]]&gt;}}|TypeAdv9=true|
|_sphereColliderRadii|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:Float|Float]]&gt;}}|TypeAdv9=true| A list of fields to drive for the sphere rotations  of the cube gizmo visual.
|_material|'''[[OverlayFresnelMaterial|OverlayFresnelMaterial]]'''|TypeAdv10=true|
|_material|'''[[OverlayFresnelMaterial|OverlayFresnelMaterial]]'''|TypeAdv10=true| The material being used for the gizmo visual.
|_handleSphere|'''[[Component:IcoSphereMesh|IcoSphereMesh]]'''|TypeAdv11=true|
|_handleSphere|'''[[Component:IcoSphereMesh|IcoSphereMesh]]'''|TypeAdv11=true| The mesh being used for the handles of the gizmo like corners or faces.
|_visualRoot|Slot|
|_visualRoot|Slot| The slot of the visual root.
|_visualPosition|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv13=true|
|_visualPosition|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv13=true| The field to drive for the visual position.
|_visualRotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv14=true|
|_visualRotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv14=true| The field to drive for the visual rotation.
|_visualScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv15=true|
|_visualScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv15=true| The field to drive for the visual scale.
|_tubeBox|{{RootFieldType|DriveRef`1|[[Component:TubeBoxMesh|TubeBoxMesh]]}}|TypeAdv16=true|
|_tubeBox|{{RootFieldType|DriveRef`1|[[Component:TubeBoxMesh|TubeBoxMesh]]}}|TypeAdv16=true| The tube box mesh being used for the gizmo visual.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
{{stub}}


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
Used to edit box colliders or box meshes. Created by the dev tool when switching gizmo modes when having a box selected.


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Box Gizmo]]
[[Category:Components{{#translation:}}|Box Gizmo]]
[[Category:Components:Uncategorized{{#translation:}}|Box Gizmo]]
[[Category:Components:Uncategorized{{#translation:}}|Box Gizmo]]

Latest revision as of 22:44, 10 February 2025

Component image 
Box Gizmo component as seen in the Scene Inspector

The BoxGizmo component is used to make the handles and visual for editing a box mesh or collider, and also handles the interaction with the handles.

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.
TargetSlot Slot The slot of the box to edit.
BoxCenterSpace direct RootSpace The coordinate space to transform by when making the result of BoxCenter
BoxSizeSpace direct RootSpace The coordinate space to transform by when making the result of BoxSize
BoxSize direct RelayRef`1<IField`1<Float3>> The field to edit for the box size.
BoxCenter direct RelayRef`1<IField`1<Float3>> The field to drive for the box center.
LockOffset Bool Whether to lock the offset of the box so it's center stays the same.
_vertices list of FieldDrive`1<Float3> A list of fields to drive for the vertex positions of the cube gizmo visual.
_edges list of FieldDrive`1<Float3> A list of fields to drive for the edge positions of the cube gizmo visual.
_faces list of FieldDrive`1<Float3> A list of fields to drive for the face positions of the cube gizmo visual.
_sphereColliderRadii list of FieldDrive`1<Float> A list of fields to drive for the sphere rotations of the cube gizmo visual.
_material OverlayFresnelMaterial The material being used for the gizmo visual.
_handleSphere IcoSphereMesh The mesh being used for the handles of the gizmo like corners or faces.
_visualRoot Slot The slot of the visual root.
_visualPosition field drive of Float3 The field to drive for the visual position.
_visualRotation field drive of FloatQ The field to drive for the visual rotation.
_visualScale field drive of Float3 The field to drive for the visual scale.
_tubeBox reference drive of TubeBoxMesh The tube box mesh being used for the gizmo visual.

Usage

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Examples

Used to edit box colliders or box meshes. Created by the dev tool when switching gizmo modes when having a box selected.

See Also