5.6 KiB
Set Position (Sequential)
Menu Path : Position > Set Position (Sequential : <SequentialMode>)
The Set Position (Sequential) Block calculates a position based on arithmetic sequences and stores the result in the position attribute. Optionally, it can also calculate a position based on an offset index in the sequence and store the result in the targetPosition attribute.
There are different modes available which determine which index to use for the sequence, whether to write the position and/or the target position, and how the sequence wraps when it reaches its limits.
This Block also calculates the direction for the sampled position and stores it to the direction attribute, based on composition. The way this Block calculates the direction changes depending on the sequence type. The selection types available are:
-
Line Sequencer: The direction equals the direction of the line from start to finish.
-
Circle Sequencer: The direction is the normal of the circle at the calculated position.
-
Three Dimensional Sequencer: The direction equals the normalized vector from the origin to the calculated position.
Block compatibility
This Block is compatible with the following Contexts:
Block settings
Setting | Type | Description |
---|---|---|
Composition Position | Enum | (Inspector) Specifies how this Block composes the position attribute. The options are: • Set: Overwrites the position attribute with the new value. • Add: Adds the new value to the position attribute value. • Multiply: Multiplies the position attribute value by the new value. • Blend: Interpolates between the position attribute value and the new value. You can specify the blend factor between 0 and 1. |
Composition Direction | Enum | (Inspector) Specifies how this Block composes the direction attribute. The options are: • Set: Overwrites the direction attribute with the new value. • Add: Adds the new value to the direction attribute value. • Multiply: Multiplies the direction attribute value by the new value. • Blend: Interpolates between the direction attribute value and the new value. You can specify the blend factor between 0 and 1. |
Composition Target Position | Enum | (Inspector) Specifies how this Block composes the targetPosition attribute. The options are: • Set: Overwrites the targetPosition attribute with the new value. • Add: Adds the new value to the targetPosition attribute value. • Multiply: Multiplies the targetPosition attribute value by the new value. • Blend: Interpolates between the targetPosition attribute value and the new value. You can specify the blend factor between 0 and 1. This setting only appears if you enable Write Target Position. |
Index | Enum | The index to use to sample the sequence. The options are: • ParticleID: Uses the particleID attribute. • Custom: Uses a custom which you provide in the Index property. |
Write Position | Bool | Toggles whether or not the sequence writes to the position attribute. |
Write Target Position | Bool | Toggles whether or not the sequence writes to the targetposition attribute. |
Mode | Enum | The wrap mode to use for the sequence. The options are: • Clamp: Elements with an index greater than the last element of the sequence repeat the last element of the sequence. • Wrap: Elements with an index greater than the last element repeat from the first element. • Mirror: Elements with an index greater than the last element repeat in inverse order, then back into correct order after reaching zero. |
Block properties
Input | Type | Description |
---|---|---|
Index | int | Determines the custom provided index to sample the sequence. This property only appears if you set Index to Custom. |
Offset Index | int | Applies an offset to the sampled index in order to determine the position in the sequence. |
Blend Position | Float | The blend percentage between the current position attribute value and the newly calculated position value. This property only appears if you set Composition Position to Blend. |
Blend Direction | Float | The blend percentage between the current direction attribute value and the newly computed direction value. This property only appears if you set Composition Direction to Blend. |
Offset Target Index | int | Applies an offset to the sampled index in order to determine the targetPosition in the sequence. |
Blend Target Position | Float | The blend percentage between the current targetPosition attribute value and the newly calculated targetPosition value. This property only appears if you set Composition Target Position to Blend. |