How to access collision id when writing API
Hello,
I noticed that if I switched on Track Collisions in simulator. I can have the access to Collision information, including the collision ID. What's more, I noticed that custom contact properties are applied on a whole collision process and each collision process must correspond to a collision ID. However, I couldn't find this term in API documents. Could anyone tell me how to find this information?
Regards,
Jason
Best Answer
-
Hi Jason,
Collision data doesn't 'exist' in the API, only Contact, Particle and Geometry information is available. A collision is a series of contacts between two elements, and as you say the same Custom Contact exists for the duration of the Collision so you can configure Custom Contacts to behave similar to Collision data but it's not quite the same.
If you do need Collision data in the API the best approach is to use the Custom Contacts to track the info you want, this can cause some challenges as once the Collision ends you have no contact information. And that this is only written to the file on the save interval.
Regards
Stephen
1
Answers
-
Hi Jason,
Collision data doesn't 'exist' in the API, only Contact, Particle and Geometry information is available. A collision is a series of contacts between two elements, and as you say the same Custom Contact exists for the duration of the Collision so you can configure Custom Contacts to behave similar to Collision data but it's not quite the same.
If you do need Collision data in the API the best approach is to use the Custom Contacts to track the info you want, this can cause some challenges as once the Collision ends you have no contact information. And that this is only written to the file on the save interval.
Regards
Stephen
1