unreal.RigUnit_HierarchyAddDynamicsParticleForceField¶
- class unreal.RigUnit_HierarchyAddDynamicsParticleForceField(execute_pin: RigVMExecutePin = [], dynamics_solver_component_key: RigComponentKey = Ellipsis, field_transform: Transform = Ellipsis, space: RigDynamicsSimulationSpace = Ellipsis, type: PhysicsControlForceType = Ellipsis, radial_force: float = 0.0, linear_force_direction: Vector = Ellipsis, linear_force: float = 0.0, rotational_force_axis: Vector = Ellipsis, rotational_force: float = 0.0, field_curves: RigDynamicsForceFieldCurves = Ellipsis, draw_debug: bool = False, debug_force_scale: float = 0.0)¶
Bases:
RigUnit_DynamicsBaseMutableSpecifies forces on Dynamics particles to be applied in the next simulation step, based on the particle’s location relative to the field. Multiple calls within the same frame accumulate. Forces queued during a pass-through frame (the next StepDynamicsSolver has Alpha <= 0) are discarded. Particles have no orientation, so there is no torque or location-offset variant.
The force (which can be specified as a force, acceleration, impulse or velocity change) is made up of a radial, linear and rotational contribution.
C++ Source:
Plugin: ControlRigDynamics
Module: ControlRigDynamics
File: RigDynamicsExecutionHelpers.h
Editor Properties: (see get_editor_property/set_editor_property)
debug_force_scale(float): [Read-Write] Multiplier on the debug arrow length. Force magnitudes (kg cm/s^2 for Force, kg cm/s for Impulse, etc.) are unwieldy as world-space lengths; tune until the arrows are legible.draw_debug(bool): [Read-Write] If true, the field draws its ellipsoid shape and an arrow per in-field particle showing this field’s force contribution. Subject to the ControlRig.Dynamics.AllowVisualization CVar.dynamics_solver_component_key(RigComponentKey): [Read-Write] The Solver to useexecute_pin(RigVMExecutePin): [Read-Write] This property is used to chain multiple mutable units togetherfield_curves(RigDynamicsForceFieldCurves): [Read-Write] Per-radius-fraction multiplier curves applied to each of the three contributions.field_transform(Transform): [Read-Write] The position, orientation and extents of the field shape. The scale specifies the radius (cm) in each direction, so the field ends up being an ellipsoid shape.linear_force(float): [Read-Write] The magnitude of the linear contributionlinear_force_direction(Vector): [Read-Write] The direction of the linear contribution. Auto-normalised internally, so a non-unit vector does not double-encode the magnitude.radial_force(float): [Read-Write] The magnitude of the radial contributionrotational_force(float): [Read-Write] The magnitude of the rotational contributionrotational_force_axis(Vector): [Read-Write] The axis around which the rotational contribution is applied. Only the direction is used; magnitude comes from RotationalForce.space(RigDynamicsSimulationSpace): [Read-Write] The space in which the field is specified.type(PhysicsControlForceType): [Read-Write] How Force is interpreted: Force (kg cm/s^2), Acceleration (cm/s^2, mass-independent), Impulse (kg cm/s, one-shot momentum change), VelocityChange (cm/s, one-shot, mass-independent).
- property debug_force_scale: float¶
[Read-Write] Multiplier on the debug arrow length. Force magnitudes (kg cm/s^2 for Force, kg cm/s for Impulse, etc.) are unwieldy as world-space lengths; tune until the arrows are legible.
- Type:
(float)
- property draw_debug: bool¶
[Read-Write] If true, the field draws its ellipsoid shape and an arrow per in-field particle showing this field’s force contribution. Subject to the ControlRig.Dynamics.AllowVisualization CVar.
- Type:
(bool)
- property dynamics_solver_component_key: RigComponentKey¶
[Read-Write] The Solver to use
- Type:
- property field_curves: RigDynamicsForceFieldCurves¶
[Read-Write] Per-radius-fraction multiplier curves applied to each of the three contributions.
- Type:
- property field_transform: Transform¶
[Read-Write] The position, orientation and extents of the field shape. The scale specifies the radius (cm) in each direction, so the field ends up being an ellipsoid shape.
- Type:
- property linear_force_direction: Vector¶
[Read-Write] The direction of the linear contribution. Auto-normalised internally, so a non-unit vector does not double-encode the magnitude.
- Type:
(Vector)
- property rotational_force: float¶
[Read-Write] The magnitude of the rotational contribution
- Type:
(float)
- property rotational_force_axis: Vector¶
[Read-Write] The axis around which the rotational contribution is applied. Only the direction is used; magnitude comes from RotationalForce.
- Type:
(Vector)
- property space: RigDynamicsSimulationSpace¶
[Read-Write] The space in which the field is specified.
- Type:
- property type: PhysicsControlForceType¶
Force (kg cm/s^2), Acceleration (cm/s^2, mass-independent), Impulse (kg cm/s, one-shot momentum change), VelocityChange (cm/s, one-shot, mass-independent).
- Type:
- Type:
[Read-Write] How Force is interpreted