unreal.RigUnit_SpringInterpQuaternionV2

class unreal.RigUnit_SpringInterpQuaternionV2(target: Quat = Ellipsis, strength: float = 0.0, critical_damping: float = 0.0, torque: Vector = Ellipsis, use_current_input: bool = False, current: Quat = Ellipsis, target_velocity_amount: float = 0.0, initialize_from_target: bool = False, result: Quat = Ellipsis, angular_velocity: Vector = Ellipsis)

Bases: RigVMFunction_SimBase

Uses a simple spring model to interpolate a quaternion from Current to Target.

C++ Source:

  • Plugin: ControlRig

  • Module: ControlRig

  • File: RigUnit_SpringInterp.h

Editor Properties: (see get_editor_property/set_editor_property)

  • angular_velocity (Vector): [Read-Write] Angular velocity

  • 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 (Quat): [Read-Write] Current position of the spring.

  • 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 (Quat): [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 (Quat): [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.

  • torque (Vector): [Read-Write] Extra torque to apply (since the moment of inertia is 1, this is also the angular acceleration).

  • 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.

property angular_velocity: Vector

[Read-Only] Angular velocity

Type:

(Vector)

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 current: Quat

[Read-Write] Current position of the spring.

Type:

(Quat)

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 result: Quat

[Read-Only] New position of the spring after delta time.

Type:

(Quat)

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: Quat

[Read-Write] Rest/target position of the spring.

Type:

(Quat)

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 torque: Vector

[Read-Write] Extra torque to apply (since the moment of inertia is 1, this is also the angular acceleration).

Type:

(Vector)

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)