Use a FloatValueAccumulator to increase the value of a float property type or a property field
over time or per frame.
To use a FloatValueAccumulator, set:
- The property type on the node whose value you want to increment. You set this in the
TargetPropertyTypeProperty. If the target property type is a compound property type,
to set the property field that you want to increment, use the TargetPropertyFieldProperty.
- The size of the increment:
- To set increments of fixed size, set the IncrementSizeProperty.
- To define the size of increments with a property, set the IncrementSizeSourceProperty.
For example, this way you can change the size of increments during application runtime.
- How the Value Accumulator increments the accumulated value. You set this in the IncrementModeProperty:
- IncrementMode::TimeBased (default) increments based on time intervals. Set the frequency
of increments in milliseconds in the IncrementTimeIntervalProperty.
- IncrementMode::PerFrame increments once per frame, ignoring the time delta. Use this mode
for frame counters.
- The range for the total sum of the increments:
- Set the lowest value with the MinimumAccumulatedValueProperty.
- Set the highest value with the MaximumAccumulatedValueProperty.
Keep in mind that the final value of the target property is the base value of the property
plus the total sum of the increments added by a Value Accumulator.
- How you want the Value Accumulator to handle the increments when it reaches the limits of the range of increments.
You set this in the BoundTypeProperty. When the value of the target property reaches the limits of the range:
- BoundType::Clamp clamps the value
- BoundType::Loop wraps the value
For an example of using the per-frame increment mode, see IntValueAccumulator.
Increments the value of a float property over time.
Inherits properties and message types from FloatValueAccumulatorMetadata.
Synopsis
Methods
| create() |
Creates a FloatValueAccumulator
|
-
FloatValueAccumulator.FloatValueAccumulator:create(name)
¶
-
Creates a FloatValueAccumulator.
Parameters
| name |
(string) |
Name of the node component.
|
Return Values