After a call to NewtonUpdate, the processing callbacks will be triggered in specific order, it is important to know in which order these callback events are called as information from one callback may be needed in another and the data has to be properly stored to reach the other callback.
An example: if you require information if a body was in contact with ground in last update, since the contact callback happens after the forcetorque callback, you need to store that information in contact end callback and store it until next update for use in forcetorque callback. after using it you reset it to no-contact state. That way you can have reliable information if a body is in contact with the ground.
- The material contact begin, process and end callbacks for each collision contact are called in group for each body in that order in Newton 1.35 and previous versions.
- Newton calls the 3 material contact callbacks in the same general order, but does not group these calls for each body, so it may first call contact begin for some bodies, and then call contact process for all bodies.