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
17961796
17971797 _metavoxels.init();
17981798
1799− _particleCollisionSystem.init(&_particleEditSender, _particles.getTree(), _voxels.getTree(), &_audio, &_myAvatar);
1799+ _particleCollisionSystem.init(&_particleEditSender, _particles.getTree(), _voxels.getTree(), &_audio);
18001800
18011801 _palette.init(_glWidget->width(), _glWidget->height());
18021802 _palette.addAction(Menu::getInstance()->getActionForOption(MenuOption::VoxelAddMode), 0, 0);
@@ -2310,7 +2310,12 @@ void Application::update(float deltaTime) { · 507 unmodified lines
23102310 updateCursor(deltaTime); // Handle cursor updates
23112311
23122312 _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);
23142319 }
23152320
23162321 void 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