| 106 | } |
| 107 | |
| 108 | void BlastFamily::updatePreSplit(float dt) |
| 109 | { |
| 110 | if (!m_spawned) |
| 111 | { |
| 112 | ExtPxSpawnSettings spawnSettings = { |
| 113 | &m_physXController.getPhysXScene(), |
| 114 | m_physXController.getDefaultMaterial(), |
| 115 | RIGIDBODY_DENSITY |
| 116 | }; |
| 117 | |
| 118 | m_pxFamily->spawn(m_initialTransform, PxVec3(1.0f), spawnSettings); |
| 119 | reloadStressSolver(); |
| 120 | |
| 121 | m_spawned = true; |
| 122 | } |
| 123 | |
| 124 | // collect potential actors to health update |
| 125 | m_actorsToUpdateHealth.clear(); |
| 126 | for (const ExtPxActor* actor : m_actors) |
| 127 | { |
| 128 | if (actor->getTkActor().isPending()) |
| 129 | { |
| 130 | m_actorsToUpdateHealth.emplace(actor); |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | void BlastFamily::updateAfterSplit(float dt) |
| 136 | { |