Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Two Quick Beginner Questions
#1
Hi,

two quick questions:

1. How do you manage that your softbodies collide with each other?
I saw that you can click on Edit Particles, then select "Phase", type in a unique number and click on the "Fill all" icon.
But my objects still don't collide. Also, I think this procedure is a bit tedious. I suppose the workflow is to do it by code?

2. I have a trash bag that was turned into a softbody. When my player collides with the softbody he just walks over it (looks awesome though).
I want the player to kick the trashbag in his walking direction when colliding with it. I thought that the script at the end of this site would be perfect for that:
http://obi.virtualmethodstudio.com/tutor...sions.html

My problem is that I dont find a reference to anything I could use force on, when I reach the point:

Code:
           // this one is an actual collision:
           if (contact.distance < 0.01)
           {
               Component collider;
               if (ObiCollider.idToCollider.TryGetValue(contact.other, out collider))
               {
                   // do something with the collider.
                   //contact.
               }
           }

I know that I can compute all the needed values by checking the collider rigidbody and transform, but what I am looking for is something like:
contact.softbody.addForce();

I hope you understand my issue.

Best regards, and thanks again for the awesome support.
Reply


Messages In This Thread
Two Quick Beginner Questions - by HenryChinaski - 05-08-2019, 01:53 PM
RE: Two Quick Beginner Questions - by josemendez - 07-08-2019, 01:41 PM
RE: Two Quick Beginner Questions - by josemendez - 20-08-2019, 10:04 AM
RE: Two Quick Beginner Questions - by josemendez - 20-08-2019, 05:22 PM