05-08-2019, 01:53 PM
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:
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.
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.