Difference between revisions of "Category:Physics Material Section"
(Created page with "Newton material settings are based on real world values and always set in pairs. NewtonMaterialSetDefaultCollidable - Sets information, weither a material pair can co...") |
|||
Line 15: | Line 15: | ||
[[NewtonContactsProcess]] callback sends you the contact "joint" object pointer which you can iterate using ([[NewtonContactJointGetContactCount]], [[NewtonContactJointGetFirstContact]], [[NewtonContactJointGetNextContact]]). | [[NewtonContactsProcess]] callback sends you the contact "joint" object pointer which you can iterate using ([[NewtonContactJointGetContactCount]], [[NewtonContactJointGetFirstContact]], [[NewtonContactJointGetNextContact]]). | ||
− | To determine which part of compound collision, you can use NewtonMaterialGetBodyCollidingShape function, that will give you individual piece of compound collision that collided. On that you can make another call to NewtonCollisionGetUserData to get collision shape's user data. | + | * To determine which part of compound collision, you can use [[NewtonMaterialGetBodyCollidingShape]] function, that will give you individual piece of compound collision that collided. On that you can make another call to [[NewtonCollisionGetUserData]] to get collision shape's user data. |
− | + | * To determine which part of trimesh collided, you can use [[NewtonMaterialGetContactFaceAttribute]], that will give you the faceid / faceAttribute that you specified while building the trimesh - function [[NewtonTreeCollisionAddFace]]. | |
− | To determine which part of trimesh collided, you can use NewtonMaterialGetContactFaceAttribute, that will give you the faceid / faceAttribute that you specified while building the trimesh - function NewtonTreeCollisionAddFace. | ||
With material contact functions you can then control individual customized collision contact response, this are: | With material contact functions you can then control individual customized collision contact response, this are: |
Revision as of 07:04, 3 July 2020
Newton material settings are based on real world values and always set in pairs.
NewtonMaterialSetDefaultCollidable - Sets information, weither a material pair can collide. NewtonMaterialSetDefaultElasticity - Sets default elasticity NewtonMaterialSetDefaultFriction - Sets default static and dynamic / kinetic / sliding friction NewtonMaterialSetDefaultSoftness - Sets surface softness NewtonMaterialSetSurfaceThickness - Sets surface's skin thickness
Friction for materials can be set up using a real world table or calculator such as: https://www.engineeringtoolbox.com/friction-coefficients-d_778.html
Since material is assigned to a body, that would limit complex material setup on trimeshes or compound collisions, in such case you can use a custom material setup in following way:
NewtonContactsProcess callback sends you the contact "joint" object pointer which you can iterate using (NewtonContactJointGetContactCount, NewtonContactJointGetFirstContact, NewtonContactJointGetNextContact).
- To determine which part of compound collision, you can use NewtonMaterialGetBodyCollidingShape function, that will give you individual piece of compound collision that collided. On that you can make another call to NewtonCollisionGetUserData to get collision shape's user data.
- To determine which part of trimesh collided, you can use NewtonMaterialGetContactFaceAttribute, that will give you the faceid / faceAttribute that you specified while building the trimesh - function NewtonTreeCollisionAddFace.
With material contact functions you can then control individual customized collision contact response, this are:
NewtonMaterialSetContactSoftness NewtonMaterialSetContactThickness NewtonMaterialSetContactElasticity NewtonMaterialSetContactFrictionState NewtonMaterialSetContactFrictionCoef NewtonMaterialSetContactNormalAcceleration NewtonMaterialSetContactNormalDirection NewtonMaterialSetContactPosition NewtonMaterialSetContactTangentFriction NewtonMaterialSetContactTangentAcceleration NewtonMaterialContactRotateTangentDirections NewtonMaterialGetContactPruningTolerance NewtonMaterialSetContactPruningTolerance
Pages in category ‘Physics Material Section’
The following 21 pages are in this category, out of 21 total.
N
- NewtonContactsProcess
- NewtonMaterialCreateGroupID
- NewtonMaterialDestroyAllGroupID
- NewtonMaterialGetDefaultGroupID
- NewtonMaterialGetUserData
- NewtonMaterialSetCallbackUserData
- NewtonMaterialSetCollisionCallback
- NewtonMaterialSetCompoundCollisionCallback
- NewtonMaterialSetContactGenerationCallback
- NewtonMaterialSetDefaultCollidable
- NewtonMaterialSetDefaultElasticity
- NewtonMaterialSetDefaultFriction
- NewtonMaterialSetDefaultSoftness
- NewtonMaterialSetSurfaceThickness
- NewtonOnAABBOverlap
- NewtonOnCompoundSubCollisionAABBOverlap
- NewtonOnContactGeneration
- NewtonWorldGetFirstBody
- NewtonWorldGetFirstMaterial
- NewtonWorldGetNextBody
- NewtonWorldGetNextMaterial