18-10-2020, 01:10 AM
Hi,
I'm trying to create a custom class that inherits from ObiUpdater that can simulate in one frame.
So far I have this class which I based on the code for ObiFixedUpdater:
I've added the solver to the list of solvers in the inspector, and the simulation works using the ObiFixedUpdater component.
I would expect that given the parameters (3, 10) after calling the function the cloth's appearance would reflect 3 seconds worth of simulating. However, this doesn't appear to simulate the cloth at all.
What am I missing? Please let me know if I should provide any further information.
Cheers,
Jordan
I'm trying to create a custom class that inherits from ObiUpdater that can simulate in one frame.
So far I have this class which I based on the code for ObiFixedUpdater:
Code:
public class PatchUpdater : ObiUpdater
{
public void UpdateCloth(float delta, int substeps)
{
ObiProfiler.EnableProfiler();
float substepDelta = delta / substeps;
BeginStep(delta);
for (int i = 0; i < substeps; ++i)
{
Substep(substepDelta);
}
EndStep(substepDelta);
ObiProfiler.DisableProfiler();
}
}
I've added the solver to the list of solvers in the inspector, and the simulation works using the ObiFixedUpdater component.
I would expect that given the parameters (3, 10) after calling the function the cloth's appearance would reflect 3 seconds worth of simulating. However, this doesn't appear to simulate the cloth at all.
What am I missing? Please let me know if I should provide any further information.
Cheers,
Jordan