Feb 1, 2012 at 7:24 PM
Edited Feb 1, 2012 at 7:34 PM
I confirmed that the dynamic body gets into the static one when push by a kinematic object.
Now, if I understand properly, I could, using the OnCollision / OnSeparation callbacks know which dynamic objects the kinematic object is contacting; then, during the contact phase, the idea is to monitor the forces applied to the objects, to see if the
force I am applying through the kinematic object gets cancelled by the force resulting from the contact with the static object.
Am I getting this right?
If so, there are two problems at hand:
- There is penetration between B and C, although it is not huge, it is present, so it would indicate that the forces do not cancel one another; they eventually do when the penetration stops (with my object's it's about 1/3 of the object's volume that goes
- Which fields specifically should I monitor one I know which objects are in contact?
In the meantime, I tried the following: I logged the linear velocity of the object and here is what I found:
if I push the B object into C, there is a linear velocity that points away from the contact, so B wants to be out of C; this could work to detect the collision as it pushes back against my impulse.
When the penetration is not too large, the result log is a bit odd though:
in this case, you can see that the sign is changing; the numbers are almost null, so it could just be a precision issue, but at the same time, I'm a little bit puzzled that the sign bounces back and forth.
This doesn't entirely solve the problem because I do not know the force A is applying on B and B may get a composite force from several sources, so it is hard to look at the reaction from B and determine A's responsibility.