Merge pull request #54193 from object71/fix-changing-particle-amount-is-not-reflected

Fix changing particle amount is not reflected
This commit is contained in:
Rémi Verschelde 2021-10-24 22:03:59 +02:00 committed by GitHub
commit f5b85cd066
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,6 +73,7 @@ void CPUParticles3D::set_amount(int p_amount) {
} }
particle_data.resize((12 + 4 + 4) * p_amount); particle_data.resize((12 + 4 + 4) * p_amount);
RS::get_singleton()->multimesh_set_visible_instances(multimesh, -1);
RS::get_singleton()->multimesh_allocate_data(multimesh, p_amount, RS::MULTIMESH_TRANSFORM_3D, true, true); RS::get_singleton()->multimesh_allocate_data(multimesh, p_amount, RS::MULTIMESH_TRANSFORM_3D, true, true);
particle_order.resize(p_amount); particle_order.resize(p_amount);