Skip to main content

More properties

Physics bodies have many more properties that control their behavior within the physics engine.

  • friction controls how much friction the physics body experiences.
  • restitution controls how much energy is lost when the physics body collides with another physics body.
  • angularVelocity controls how fast the physics body rotates.
  • and more...

Refer to the PhysicsBody API reference for a complete list of properties. Because the m2c2kit physics functionality uses the Matter.js engine, the Matter.Body API reference will offer even more detail on these properties.

The example increases the angular velocity of the label each time the "GO" button is press. Press the button a few times to see the label spin faster and faster!

Loading...