Physics.P2#P2

new P2(game, config)

This is your main access to the P2 Physics World.
From here you can create materials, listen for events and add bodies into the physics simulation.

Parameters
Name Type Argument Description
game Phaser.Game

Reference to the current game instance.

config object <optional>

Physics configuration object passed in from the game constructor.

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

Please login to continue.