unreal.RigUnit_SpringInterpVectorV2
¶
- class unreal.RigUnit_SpringInterpVectorV2(target: Vector = Ellipsis, strength: float = 0.0, critical_damping: float = 0.0, force: Vector = Ellipsis, use_current_input: bool = False, current: Vector = Ellipsis, target_velocity_amount: float = 0.0, initialize_from_target: bool = False, result: Vector = Ellipsis, velocity: Vector = Ellipsis)¶
Bases:
RigVMFunction_SimBase
Uses a simple spring model to interpolate a vector from Current to Target.
C++ Source:
Plugin: ControlRig
Module: ControlRig
File: RigUnit_SpringInterp.h
Editor Properties: (see get_editor_property/set_editor_property)
critical_damping
(float): [Read-Write] The amount of damping in the spring. Set it smaller than 1 to make the spring oscillate before stabilizing on the target. Set it equal to 1 to reach the target without overshooting. Set it higher than one to make the spring take longer to reach the target.current
(Vector): [Read-Write] Current position of the spring.force
(Vector): [Read-Write] Extra force to apply (since the mass is 1, this is also the acceleration).initialize_from_target
(bool): [Read-Only] If true, then the initial value will be taken from the target value, and not from the current value.result
(Vector): [Read-Write] New position of the spring after delta time.strength
(float): [Read-Write] The spring strength determines how hard it will pull towards the target. The value is the frequency at which it will oscillate when there is no damping.target
(Vector): [Read-Write] Rest/target position of the spring.target_velocity_amount
(float): [Read-Write] The amount that the velocity should be passed through to the spring. A value of 1 will result in more responsive output, but if the input is noisy or has step changes, these discontinuities will be passed through to the output much more than if a smaller value such as 0 is used.use_current_input
(bool): [Read-Only] If true, then the Current input will be used to initialize the state, and is required to be a variable that holds the current state. If false then the Target value will be used to initialize the state and the Current input will be ignored/unnecessary as a state will be maintained by this node.velocity
(Vector): [Read-Write] Velocity
- property critical_damping: float¶
[Read-Write] The amount of damping in the spring. Set it smaller than 1 to make the spring oscillate before stabilizing on the target. Set it equal to 1 to reach the target without overshooting. Set it higher than one to make the spring take longer to reach the target.
- Type:
(float)
- property force: Vector¶
[Read-Write] Extra force to apply (since the mass is 1, this is also the acceleration).
- Type:
(Vector)
- property initialize_from_target: bool¶
[Read-Only] If true, then the initial value will be taken from the target value, and not from the current value.
- Type:
(bool)
- property strength: float¶
[Read-Write] The spring strength determines how hard it will pull towards the target. The value is the frequency at which it will oscillate when there is no damping.
- Type:
(float)
- property target_velocity_amount: float¶
[Read-Write] The amount that the velocity should be passed through to the spring. A value of 1 will result in more responsive output, but if the input is noisy or has step changes, these discontinuities will be passed through to the output much more than if a smaller value such as 0 is used.
- Type:
(float)
- property use_current_input: bool¶
[Read-Only] If true, then the Current input will be used to initialize the state, and is required to be a variable that holds the current state. If false then the Target value will be used to initialize the state and the Current input will be ignored/unnecessary as a state will be maintained by this node.
- Type:
(bool)