ContactMaterial Class
Defines what happens when two materials meet, such as what friction coefficient to use. You can also set other things such as restitution, surface velocity and constraint parameters.
Constructor
ContactMaterial
-
materialA
-
materialB
-
[options]
Parameters:
-
materialA
Material -
materialB
Material -
[options]
Object optional-
[friction=0.3]
Number optionalFriction coefficient.
-
[restitution=0]
Number optionalRestitution coefficient aka "bounciness".
-
[stiffness]
Number optionalContactEquation stiffness.
-
[relaxation]
Number optionalContactEquation relaxation.
-
[frictionStiffness]
Number optionalFrictionEquation stiffness.
-
[frictionRelaxation]
Number optionalFrictionEquation relaxation.
-
[surfaceVelocity=0]
Number optionalSurface velocity.
-
Item Index
Properties
friction
Number
Friction to use in the contact of these two materials
frictionRelaxation
Number
Relaxation of the resulting FrictionEquation that this ContactMaterial generate
frictionStiffness
Number
Stiffness of the resulting FrictionEquation that this ContactMaterial generate
id
Number
The contact material identifier
relaxation
Number
Relaxation of the resulting ContactEquation that this ContactMaterial generate
restitution
Number
Restitution to use in the contact of these two materials
stiffness
Number
Stiffness of the resulting ContactEquation that this ContactMaterial generate
surfaceVelocity
Number
Will add surface velocity to this material. If bodyA rests on top if bodyB, and the surface velocity is positive, bodyA will slide to the right.