History

Fix issue #1684 : particles collide against avatars again.

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().

Andrew Meadows committed 12 years ago

Commit 2b5675b1 parent 2fa3fc55 files · +31 −48Browse files

Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all

Unified · Split

interface/src/Application.cpp+7−2
@@ -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 updates2310 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
2316void Application::updateAvatar(float deltaTime) {2321void Application::updateAvatar(float deltaTime) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t