Component:RelativePositioner: Difference between revisions

From Resonite Wiki
Automated: update Fields
add info
 
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=RelativePositionerComponent.png
|Image=RelativePositionerComponent.png
|Name=Relative Positioner
|Name=Relative Positioner
}}
}}
The '''RelativePositioner''' component puts the slot its attached to in a position based on the Bounding box and position of <code>Reference</code>. Optionally deleting the component on an update when the slot is positioned successfully.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Reference|Slot|
|Reference|Slot| The slot to Relative position to.
|ReferenceBoundsSpace|{{RootFieldType|RootSpace}}|TypeAdv1=true|
|ReferenceBoundsSpace|{{RootFieldType|RootSpace}}|TypeAdv1=true| The space to calculate the Bounding box of <code>Reference</code> in.
|ReferenceAnchor|Float3|
|ReferenceAnchor|Float3| How far away from the center of the <code>Reference</code>'s Bounding box based on size. (1,1,1) puts this slot at the positive corner in global space of <code>Reference</code>'s Bounding box and (0,0,0) put it at <code>Reference</code>'s center Bounding box point.
|ReferenceOffset|Float3|
|ReferenceOffset|Float3| How much to add to the slot position after Bounding box positioning.
|DestroyAfterDone|Bool|
|DestroyAfterDone|Bool| Whether to destroy  this component after update and positioning was successfully done due to needed fields not being null.
|_target|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv5=true|
|_target|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv5=true| The position field of this slot to drive.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Attach to a slot and provide a <code>Reference</code> in order for this component to do a valid position and optionally delete itself within that update.


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
{{stub}}


<!--T:5-->
<!--T:5-->
== Related Components ==
== See Also ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Relative Positioner]]
[[Category:Components{{#translation:}}|Relative Positioner]]
[[Category:Components:Transform:Drivers{{#translation:}}|Relative Positioner]]
[[Category:Components:Transform:Drivers{{#translation:}}|Relative Positioner]]

Latest revision as of 18:30, 1 February 2025

Component image 
Relative Positioner component as seen in the Scene Inspector

The RelativePositioner component puts the slot its attached to in a position based on the Bounding box and position of Reference. Optionally deleting the component on an update when the slot is positioned successfully.

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.
Reference Slot The slot to Relative position to.
ReferenceBoundsSpace direct RootSpace The space to calculate the Bounding box of Reference in.
ReferenceAnchor Float3 How far away from the center of the Reference's Bounding box based on size. (1,1,1) puts this slot at the positive corner in global space of Reference's Bounding box and (0,0,0) put it at Reference's center Bounding box point.
ReferenceOffset Float3 How much to add to the slot position after Bounding box positioning.
DestroyAfterDone Bool Whether to destroy this component after update and positioning was successfully done due to needed fields not being null.
_target field drive of Float3 The position field of this slot to drive.

Usage

Attach to a slot and provide a Reference in order for this component to do a valid position and optionally delete itself within that update.

Examples

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

See Also