No edit summary |
add remaining info, thanks for filling what I needed to understand this! |
||
(4 intermediate revisions by one other user not shown) | |||
Line 12: | Line 12: | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|LocalDirection|Float3| | |LocalDirection|Float3| A vector direction in this slot's local space to align to <code>TargetDirection</code> via rotating this slot. | ||
|TargetDirection|Float3| | |TargetDirection|Float3| The direction vector to align to. | ||
|DirectionSpace|{{RootFieldType|RootSpace}}|TypeAdv2=true| The coordinate space | |DirectionSpace|{{RootFieldType|RootSpace}}|TypeAdv2=true| The coordinate space that <code>TargetDirection</code> is in. | ||
|LocalRotation|FloatQ| | |LocalRotation|FloatQ| A rotation offset to the alignment. | ||
|_rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv4=true| | |_rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv4=true| The rotation field of the slot this component is on. Is driven to do the rotation alignment. | ||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
The defined <code>LocalDirection</code> will be rotated to line up with the <code>TargetDirection</code> inside <code>DirectionSpace</code>'s coordinate space. | |||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
A common use of the '''AxisRotationAligner''' is to make a slot's upward direction always match the upward direction of root. | |||
<!--T:5--> | <!--T:5--> | ||
== | == See Also == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Axis Rotation Aligner]] | [[Category:Components{{#translation:}}|Axis Rotation Aligner]] | ||
[[Category:Components:Transform:Drivers{{#translation:}}|Axis Rotation Aligner]] | [[Category:Components:Transform:Drivers{{#translation:}}|Axis Rotation Aligner]] |
Latest revision as of 16:29, 10 February 2025
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image 
Axis Rotation Aligner component as seen in the Scene Inspector

The AxisRotationAligner can be used to keep a slot facing a direction relative to a space.
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. |
LocalDirection
|
Float3 | A vector direction in this slot's local space to align to TargetDirection via rotating this slot.
|
TargetDirection
|
Float3 | The direction vector to align to. |
DirectionSpace
|
direct RootSpace | The coordinate space that TargetDirection is in.
|
LocalRotation
|
FloatQ | A rotation offset to the alignment. |
_rotation
|
field drive of FloatQ | The rotation field of the slot this component is on. Is driven to do the rotation alignment. |
Usage
The defined LocalDirection
will be rotated to line up with the TargetDirection
inside DirectionSpace
's coordinate space.
Examples
A common use of the AxisRotationAligner is to make a slot's upward direction always match the upward direction of root.