Hello everyone,
I’m want to enable the physic simulation on many assets so I want to automate it. I did it with Python, I can modify the gravity value for exemple, but when i enable physics, the engine crash, here is the code :
import unreal
import os
grooms_path = "/Game/assets/grooms/automated_imports"
EAL = unreal.EditorAssetLibrary()
asset = EAL.find_asset_data('/Game/assets/grooms/automated_imports/groom')
asset = asset.get_asset()
forcesSettings = unreal.HairExternalForces()
forcesSettings.set_editor_property('gravity_vector', [0, 0, -9.81])
solverSettings = unreal.HairSolverSettings()
solverSettings.set_editor_property('enable_simulation', True)
physics = unreal.HairGroupsPhysics()
physics.set_editor_property('solver_settings',solverSettings)
physics.set_editor_property('external_forces',forcesSettings)
print(asset)
asset.set_editor_property('hair_groups_physics', [physics])
Do you have an idea why ? or have you same similar things ?
Thanks !