imported>Xekri Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=SmoothTransformComponent.png |Name=Smooth Transform }} <!--T:2--> == Fields == {{Table Comp..." |
add info |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
|Name=Smooth Transform | |Name=Smooth Transform | ||
}} | }} | ||
Smooth transform is a component that is used to create a "lag behind" or "trailing" effect on slots or objects that follow another object. The slot this controls will try to return to it's rest position, iteratively getting closer and closer until in eventuality reaching it's target location at rest. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
| | |InterpolationSpace|{{RootFieldType|RootSpace}}|TypeAdv0=true| The coordinate space that should be used to check the delta of the transforms in. If set to user space and parented under the user's hand, this slot will only lag behind (or smooth) when the user moves their hand, but not when they walk around. This can also be set to a slot for similar effects without a user. | ||
| | |TargetPosition|Float3| The local transform position that this slot is trying to get to. | ||
|TargetRotation|FloatQ| the local transform rotation that this slot is trying to get to. | |||
|TargetPosition|Float3| | |TargetScale|Float3| The local transform scale that this slot is trying to get to. | ||
|TargetRotation|FloatQ| | |Position|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv4=true| The position field to drive with the smoothed value (auto filled with the position field of the slot this is on. | ||
|TargetScale|Float3| | |Rotation|{{RootFieldType|FieldDrive`1|[[Type:FloatQ|FloatQ]]}}|TypeAdv5=true| The rotation field to drive with the smoothed value (auto filled with the rotation field of the slot this is on. | ||
|Position| | |Scale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv6=true| The scale field to drive with the smoothed value (auto filled with the scale field of the slot this is on. | ||
|Rotation| | |SmoothSpeed|Float| How fast or slow this slot is at catching up to it's target location. Not a set number of seconds since this component iteratively smooths. | ||
|Scale| | |_updateIndex|Int| Whether to do this smooth transform before or after other smooth transforms in the same slot hiearchy. | ||
|SmoothSpeed|Float| | |||
|_updateIndex|Int| | |||
}} | }} | ||
Line 29: | Line 28: | ||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
Useful in making a little fairy that follows the user around. Or a trail of orbs that float along side the user. Or floating accessories/horns/trinkets that are attached to a user that follow them around. Or an object that loosely follows a racing ship. | |||
<!--T:5--> | <!--T:5--> | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Smooth Transform]] | [[Category:Components{{#translation:}}|Smooth Transform]] | ||
[[Category:Components:Transform:Drivers{{#translation:}}|Smooth Transform]] | [[Category:Components:Transform:Drivers{{#translation:}}|Smooth Transform]] |
Latest revision as of 17:49, 23 October 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
Smooth transform is a component that is used to create a "lag behind" or "trailing" effect on slots or objects that follow another object. The slot this controls will try to return to it's rest position, iteratively getting closer and closer until in eventuality reaching it's target location at rest.
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. |
InterpolationSpace
|
direct RootSpace | The coordinate space that should be used to check the delta of the transforms in. If set to user space and parented under the user's hand, this slot will only lag behind (or smooth) when the user moves their hand, but not when they walk around. This can also be set to a slot for similar effects without a user. |
TargetPosition
|
Float3 | The local transform position that this slot is trying to get to. |
TargetRotation
|
FloatQ | the local transform rotation that this slot is trying to get to. |
TargetScale
|
Float3 | The local transform scale that this slot is trying to get to. |
Position
|
field drive of Float3 | The position field to drive with the smoothed value (auto filled with the position field of the slot this is on. |
Rotation
|
field drive of FloatQ | The rotation field to drive with the smoothed value (auto filled with the rotation field of the slot this is on. |
Scale
|
field drive of Float3 | The scale field to drive with the smoothed value (auto filled with the scale field of the slot this is on. |
SmoothSpeed
|
Float | How fast or slow this slot is at catching up to it's target location. Not a set number of seconds since this component iteratively smooths. |
_updateIndex
|
Int | Whether to do this smooth transform before or after other smooth transforms in the same slot hiearchy. |
Usage
Examples
Useful in making a little fairy that follows the user around. Or a trail of orbs that float along side the user. Or floating accessories/horns/trinkets that are attached to a user that follow them around. Or an object that loosely follows a racing ship.