Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  The skin backstop changes made through the script are not reflected on the screen.
#1
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?

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
        }
Reply


Messages In This Thread
The skin backstop changes made through the script are not reflected on the screen. - by ziziza93 - 17-04-2024, 02:35 AM