unreal.ClothingSimulationInteractor

class unreal.ClothingSimulationInteractor(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: Object

If a clothing simulation is able to be interacted with at runtime then a derived interactor should be created, and at least the basic API implemented for that simulation. Only write to the simulation and context during the call to Sync, as that is guaranteed to be a safe place to access this data.

C++ Source:

  • Module: ClothingSystemRuntimeInterface

  • File: ClothingSimulationInteractor.h

cloth_config_updated() None

Called to update the cloth config without restarting the simulation.

disable_gravity_override() None

Disable any currently set gravity override.

enable_gravity_override(vector) None

Set a new gravity override and enable the override.

Parameters:

vector (Vector) –

get_clothing_interactor(clothing_asset_name) ClothingInteractor

Return a cloth interactor for this simulation.

Parameters:

clothing_asset_name (str) –

Return type:

ClothingInteractor

get_num_cloths() int32

Return the number of cloths run by the simulation.

Return type:

int32

get_num_dynamic_particles() int32

Return the number of dynamic (simulated) particles.

Return type:

int32

get_num_iterations() int32

Return the solver number of iterations. This could be different from the number set if the simulation hasn’t updated yet.

Return type:

int32

get_num_kinematic_particles() int32

Return the number of kinematic (animated) particles.

Return type:

int32

get_num_substeps() int32

Return the solver number of subdivisions./ This could be different from the number set if the simulation hasn’t updated yet.

Return type:

int32

get_simulation_time() float

Return the instant average simulation time in ms.

Return type:

float

physics_asset_updated() None

Called to update collision status without restarting the simulation.

set_anim_drive_spring_stiffness(stiffness) None

Set the stiffness of the spring force for the animation drive.

Parameters:

stiffness (float) –

set_max_num_iterations(max_num_iterations=10) None

Set the maximum number of solver iterations.

Parameters:

max_num_iterations (int32) –

set_num_iterations(num_iterations=1) None

Set the number of time dependent solver iterations.

Parameters:

num_iterations (int32) –

set_num_substeps(num_substeps=1) None

Set the number of substeps or subdivisions.

Parameters:

num_substeps (int32) –