Interacting with a simulation
alien offers the possibility to intervene directly with the mouse cursor during a running or paused simulation. This is very useful for quickly moving structures, and it is also fun to play around with.
In this tutorial, a few examples will be shown. These operations are for superficial manipulations only. The visual editor is responsible for the precise construction and programming of the world. This will be covered in later tutorials.
What you will see
1. Loading an appropriate simulation
We load the simulation ./examples/simulations/destruction.sim and go to a zoom level x1. Then we see many nested rectangular structures in blue and red. They are just there to be destroyed and to have fun :) If you scroll a bit, you can see two more bodies: yellow hexagons! They carry a lot of kinetic energy and will collide when the simulation starts. To get an overview, you can navigate through the world in navigation mode.
2. Moving cell clusters via drag and drop
Next we want to move some solids. For example, one of the hexagons! To be able to move things around we switch from the navigation mode to the action mode. For that purpose we click on the pen in the toolbar. Now we are able to move things simply by dragging and dropping (see video above). You do not have to worry about overlapping bodies at this moment. The overlap check is only active during running simulations. Only then the overlapping materials will be destroyed. The velocities and angular velocities are preserved during user movements.
Let us see how we can intervene in a running simulation. Once the simulation starts, the action mode allows us to exert forces on the bodies with the mouse cursor. There are two possibilities:
- Press and hold the left mouse button anywhere in the world and then move the cursor. With this action you apply forces to each body running in between. If the forces are too high (the threshold can be configured in the simulation parameters), the bodies can be damaged or even break apart.
- If you use the right mouse button instead, only the rotation part of the force (torque) is applied. As a result, the bodies do not move as much and start to rotate more.
Please try out both options! However, before starting the simulation, it is advisable to take a snapshot. This way you can return to the initial world with one mouse click!
Created with the Personal Edition of HelpNDoc: Produce online help for Qt applications