This a quick and dirty fix to resurrect particle-avatar collisions. We rebuild and pass a list of AvatarData* to the ParticleCollisionManager every call to update().
Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -1796,7 +1796,7 @@ void Application::init() { · 1795 unmodified lines | |||
| 1796 | 1796 | ||
| 1797 | _metavoxels.init(); | 1797 | _metavoxels.init(); |
| 1798 | 1798 | ||
| 1799 | _particleCollisionSystem.init(&_particleEditSender, _particles.getTree(), _voxels.getTree(), &_audio, &_myAvatar); | 1799 | _particleCollisionSystem.init(&_particleEditSender, _particles.getTree(), _voxels.getTree(), &_audio); |
| 1800 | 1800 | ||
| 1801 | _palette.init(_glWidget->width(), _glWidget->height()); | 1801 | _palette.init(_glWidget->width(), _glWidget->height()); |
| 1802 | _palette.addAction(Menu::getInstance()->getActionForOption(MenuOption::VoxelAddMode), 0, 0); | 1802 | _palette.addAction(Menu::getInstance()->getActionForOption(MenuOption::VoxelAddMode), 0, 0); |
| @@ -2310,7 +2310,12 @@ void Application::update(float deltaTime) { · 507 unmodified lines | |||
| 2310 | updateCursor(deltaTime); // Handle cursor updates | 2310 | updateCursor(deltaTime); // Handle cursor updates |
| 2311 | 2311 | ||
| 2312 | _particles.update(); // update the particles... | 2312 | _particles.update(); // update the particles... |
| 2313 | _particleCollisionSystem.update(); // handle collisions for the particles... | 2313 | |
| 2314 | // collide the particles... | ||
| 2315 | QVector<AvatarData*> avatars; | ||
| 2316 | avatars.push_back(&_myAvatar); | ||
| 2317 | _avatarManager.getAvatarBasePointers(avatars); | ||
| 2318 | _particleCollisionSystem.update(avatars); | ||
| 2314 | } | 2319 | } |
| 2315 | 2320 | ||
| 2316 | void Application::updateAvatar(float deltaTime) { | 2321 | void Application::updateAvatar(float deltaTime) { |