Fix rigid body not resimulating after cache invalidation
Fix 9cd6b03187 introduced a bug that
prevented simulation after a cache invalidation (for instance when
changing a setting after simulating). This fixes that.
This commit is contained in:
@@ -1515,8 +1515,10 @@ void BKE_rigidbody_aftertrans_update(Object *ob, float loc[3], float rot[3], flo
|
|||||||
|
|
||||||
void BKE_rigidbody_cache_reset(RigidBodyWorld *rbw)
|
void BKE_rigidbody_cache_reset(RigidBodyWorld *rbw)
|
||||||
{
|
{
|
||||||
if (rbw)
|
if (rbw) {
|
||||||
rbw->pointcache->flag |= PTCACHE_OUTDATED;
|
rbw->pointcache->flag |= PTCACHE_OUTDATED;
|
||||||
|
rbw->ltime = rbw->pointcache->startframe;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------ */
|
/* ------------------ */
|
||||||
|
|||||||
Reference in New Issue
Block a user