Image:
 Author: Xray Group: Default Filesize: 64.98 kB Date added: 2013-07-13 Rating: 5 Downloads: 560 Views: 521 Comments: 10 Ratings: 1 Times favored: 0 Made with: Algodoo v2.1.0 Tags:
|
This is useful only to those who use Thyme scripting in their scenes.
Many times in the past, I would struggle with why my onCollides were not working. I thought that it would be nice to have a visual representation of the collisions so that I would know if two geometries were actually colliding with each other. I since found a console command that does exactly that! The command is app.drawcollisions = true (or false). Well, as you can imagine, it was a pain in the butt to have to enter the console and type that command each time I wanted to turn the function on or off. So, I made THIS scene which allows a user to very easily enable or disable th visual collision events. You simply open this scene, click the button to enable it, then close the scene and open the scene that you want to debug. The function remains on or off even when you close the program and then reopen it.
In addition to viewing collisions, I added two other buttons that may be helpful to some. One allows you to see the vertices of polygons, and the other allows you to see the exact center of most geometries. The center is where its position (pos X and Y) is referenced. When you enable the visual center, a tiny dot shows up in the exact center of the geometry. These other two functions are not as useful as viewing collisions, but hopefully someone will be able to make use of them.
Above the buttons are a couple of sample objects that show the results of enabling and disabling the three functions.'
EDIT: I made a change that forces the sim to start automatically as soon as you load the scene (as before), but now you can stop and start the sim whenever you wish. I did this because of s_nonnan's comment that he did not like the fact that the scene was always running and you were not able to stop it with the normal Start/Stop button. Good suggestion, s_noonan! |