A common scenario: there are many different characters, we don’t want them:
- walk through each other (so we added rigid body with collision shape);
- push away each other (this is a tricky one).
I searched a little bit and found (2) is quite a popular question around. I didn’t see any straightforward solution but there are some workaround hack. For example, this one.
The basic idea is to have a parent-child nodes pair, and two rigid body with collision shape one slightly larger than the other. One set to kinematic while the other non-kinematic.
But we need to disable the collision between those two rigid body. However, we cannot directly use two different layer since rigidbody1 in character A would collide with rigidbody2 in character B.
In Unity3D, we can use Physics.IgnoreCollision(rigidbody1, rigidbody2)
as mentioned in previous link.
I did not find anything like that in Urho3D PhysicsWorld. I found someone mentioned a similar problem here that adding ‘ignore pairs’ into PhysicsWorld. But I don’t know any easy way to do that without making my own version of Urho3D.