gak / gravit

A gravity simulator
http://gravit.slowchop.com/
GNU General Public License v2.0
66 stars 15 forks source link

Select and follow a particle or group of particles #74

Open gak opened 12 years ago

gak commented 12 years ago

There are a few ways to do this, but I'm not sure of what is the best way of doing it.

Future enhancements could include:

gak commented 12 years ago

A suggestion is to use the left mouse button to click on a single particle, or a group of particles by dragging.

Leaving the right mouse button to move the camera angle.

This might confuse existing users, but I don't think it's a big deal if the ChangeLog has the appropriate information in it.

Another possibility is to use modifier keys so that you can do something special like select all other particles from the same spawn "group", or selecting all other particles within the rang of the selected particle.

FrMo commented 12 years ago

I think that particles are normally too fast to select individual ones with the mouse. But it might work that users point (and click) into a certains direction, and gravit could "lock" onto the nearest particle group. We could use the right mouse button for this. --> we need some kind of "spawn groups", and this schould be easy to implement in LUA (a "start_particle_group" call would be enough).

If we have groups (or a handfull of "special" particles), we could even build a drop-down menu, where people can select the group to follow.

gak commented 12 years ago

The drop-down menu is a good idea. Once we have particle groups, we can also add a new colour mode for it.

My suggestion earlier for selecting one particle would search for the nearest particle to the mouse, so the user doesn't have to be accurate. I would imagine the user would want to pause the simulation before selecting particles, so it is easier to select.

With the mouse buttons, generally left is used for an action and right or middle for camera manipulation, at least in games.

So I'm currently thinking these actions:

You'll be able to mix CTRL and SHIFT to add single particles, instead of groups. Also CTRL and ALT to remove single particles.