Physics.P2#setMaterial()

setMaterial(material, bodies)

Sets the given Material against all Shapes owned by all the Bodies in the given array.

Parameters
Name Type Description
material Phaser.Physics.P2.Material

The Material to be applied to the given Bodies.

bodies array.<Phaser.Physics.P2.Body>

An Array of Body objects that the given Material will be set on.

Source code: physics/p2/World.js (Line 1201)
doc_phaser
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.