Table Of Contents

Previous topic

18.9. The Physics2DDevice Object

Next topic

18.11. The Shape Object

This Page

18.10. The Material Object

18.10.1. Constructor

A material object can be constructed with Physics2DDevice.createMaterial, with a singleton, default material accessibly by Physics2DDevice.getDefaultMaterial.

18.10.2. Methods

18.10.2.1. getElasticity

Summary

Access the elasticity of this material.

Syntax

var elasticity = material.getElasticity();

18.10.2.2. getStaticFriction

Summary

Access the coefficient of static friction for this material.

Syntax

var elasticity = material.getStaticFriction();

18.10.2.3. getDynamicFriction

Summary

Access the coefficient of dynamic friction for this material.

Syntax

var dynamicFriction = material.getDynamicFriction();

18.10.2.4. getRollingFriction

Summary

Access the coefficient of rolling friction for this material.

Syntax

var rollingFriction = material.getRollingFriction();

18.10.2.5. getDensity

Summary

Access the density of this material.

Syntax

var density = material.getDensity();

18.10.3. Properties

18.10.3.1. userData

Summary

Field on which to store whatever information you may like.