03-06-2020, 05:28 AM
(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