17-04-2024, 02:35 AM
Hello,
I changed the skin backstop value in the blueprint to -0.05 and then back to 0 after 3 seconds.
After running the script, I checked with blueprint edit and the value has changed, but it is not reflected on the screen.
Do I need to run the updater separately?
I changed the skin backstop value in the blueprint to -0.05 and then back to 0 after 3 seconds.
After running the script, I checked with blueprint edit and the value has changed, but it is not reflected on the screen.
Do I need to run the updater separately?
Code:
var skinnedCloth = clothInstance.GetComponent<ObiSkinnedCloth>();
var constraints = skinnedCloth.GetConstraintsByType(Oni.ConstraintType.Skin)
as ObiConstraints<ObiSkinConstraintsBatch>;
var skinBatch = constraints.batches[0];
for (var i = 0; i < skinBatch.activeConstraintCount; ++i)
{
skinBatch.skinRadiiBackstop[i * 3 + 2] = -0.05f; // backstop sphere distance
}
await Task.Delay(3000);
for (var i = 0; i < skinBatch.activeConstraintCount; ++i)
{
skinBatch.skinRadiiBackstop[i * 3 + 2] = 0; // backstop sphere distance
}