Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to set initial cloth shape
#3
(02-06-2020, 09:02 AM)josemendez Wrote: Hi,

Baking the mesh, then generating a new blueprint our of it is a possibility.

An easier way is using actor.SaveStateToBlueprint(blueprint). This will save current particle positions and velocities to a blueprint. Make sure you save to a copy of your current blueprint, though! (that is, var passThisOne = Instantiate<ObiActorBlueprint>(rope.blueprint); )

Then just use the new blueprint next time you want to instantiate the cloth.

Btw, this is the method Obi uses internally when you switch to a new solver at runtime, to ensure data from the current solver is passed on to the new one: before leaving the current solver, it calls SaveStateToBlueprint on a copy of its current blueprint, and after entering the new solver, it loads this copy instead of the original blueprint.

Hi Jose,
Can you please clarify when I should call actor.SaveStateToBlueprint(blueprint)? (trying to fully understand your solution)
thanks.
Laurent
Reply


Messages In This Thread
how to set initial cloth shape - by lbouis - 02-06-2020, 06:31 AM
RE: how to set initial cloth shape - by lbouis - 03-06-2020, 05:28 AM