Help With .Phys Objects and Collision reporting
Hi guys, this is my first post so bare with me!
So I have been working on this project but I have fallen into a little spot of bother.
I stumbled upon the physics patch of the day ( link: https://cycling74.com/tutorials/00-physics-patch-a-day/ ) and I found a patch that really intrigued me. In specific, the day 5 project, in where particles are used to gravitate towards particular parts of the matrix in whatever specified shape you assign them.
I downloaded the project and i started to mess with the patch and i decided i wanted to make the particles to play midi notes whenever they collide with the moveable force point. Through experimenting with the patch i found that collision reporting would probably be most useful for me, however whenever i activate it doesn't give me any information that would be beneficial for dissecting and turned into something advantageous to the patch. But rather a spew of numbers that don't tell me anything. I have attached my patch to this post and highlighted with a panel object where believe that midi notes should originate from. My question i suppose, in summery would be, please could someone explain how the collision reporting object works/ how can i get useful information out of the collision reporting object so i can carry on with the rest of my patch? :P
Thank you for your time, I'm sorry if this doesn't make any sense, i will try and make it clearer if need be :D
hi nat.
the spew of numbers output from phys.ghost is a collisions dictionary. you should check out the dict objects to understand what a dictionary is. there are a few examples in the distro that demonstrate how to parse this information, but the easiest way to get a grip on it is to plug it into a dict.view. check out the phys.body.collisions example patch, and also check out this physics patch-along video, where i go into a bit of using the collisions output.
https://cycling74.com/tutorials/jit-phys-patch-along-part-2/