20-08-2019, 04:51 PM
Thanks for the reply.
I tried your suggestions but I am very sorry that I still have problems getting the player collider.
There is a debug log message whenever the softbody touches the ground, but there is no debug log message when the player touches the softbody.
The player has a capsule collider, a rigidbody, an obi collider and an obi rigidbody.
I tried your suggestions but I am very sorry that I still have problems getting the player collider.
Code:
void Solver_OnCollision(object sender, Obi.ObiSolver.ObiCollisionEventArgs e)
{
foreach (Oni.Contact contact in e.contacts)
{
// this one is an actual collision:
if (contact.distance < 0.01)
{
Component collider;
if (ObiCollider.idToCollider.TryGetValue(contact.other, out collider))
{
Collider ContactCollider = ObiCollider.idToCollider[contact.other] as Collider;
Debug.Log(ContactCollider.transform.gameObject.name);
}
}
}
}
There is a debug log message whenever the softbody touches the ground, but there is no debug log message when the player touches the softbody.
The player has a capsule collider, a rigidbody, an obi collider and an obi rigidbody.