26-03-2022, 07:05 PM
(This post was last modified: 27-03-2022, 12:22 AM by josemendez.)
(26-03-2022, 03:22 PM)Alikemalerdem Wrote: here collision object takes only one value but I want to get all the objects that hit the object.
Hi,
This is a for loop over all contacts. It will get you all the object/softbody collision pairs in the solver.
As a side note, this line of code doesn’t make any sense to me:
Code:
collision=gameObject.Find(col.name);
“col” is a component on the collider gameobject, so no need to find it by name in the entire scene. You already have a reference to it, so just do
Code:
collision = col.gameObject;
If you’re unfamiliar with C# scripting, my advice would be to learn the basics first before using Obi, as it assumes you have intermediate programming skills. Otherwise you will find it very hard and confusing to use.
Kind regards,