Fix #121766: Softbody ensure current position

When reading a cached frame the unmodified goal positions are not
synchronized along. Now fixed.

Co-authored by @bjornmose

Pull Request: https://projects.blender.org/blender/blender/pulls/121768
This commit is contained in:
YimingWu
2024-05-14 06:49:30 +02:00
committed by YimingWu
parent 9320ee2a36
commit 29dc4a85f7
@@ -3600,6 +3600,8 @@ void sbObjectStep(Depsgraph *depsgraph,
if (cache_result == PTCACHE_READ_EXACT || cache_result == PTCACHE_READ_INTERPOLATED ||
(!can_simulate && cache_result == PTCACHE_READ_OLD))
{
/* Keep goal positions in track. */
softbody_update_positions(ob, sb, vertexCos, numVerts);
softbody_to_object(ob, vertexCos, numVerts, sb->local);
BKE_ptcache_validate(cache, framenr);