Hi,
I want to add materials to my game engine plugin and wonder if this is the preferred way to do it with the current Newton version:
- get material ID's using NewtonMaterialCreateGroupID for a material pair
- create a dMaterialPairManager::dMaterialPair with these id's and set restitution and friction values
- add the dMaterialPairManager::dMaterialPair to dMaterialPairManager
- in the material collision callback, get each material from the contactJoint.
- get the dMaterialPair from dMaterialPairManager and apply the material pair values using NewtonMaterialSetContactFrictionCoef and NewtonMaterialSetContactElasticity
I wonder if I really have to handle materials myself with material collission callbacks or if there's a way where Newton will do it for me automagically.
Thanks
Shaderman