Physics.P2.Body#applyForce()

applyForce(force, worldX, worldY)

Apply force to a world point.

This could for example be a point on the RigidBody surface. Applying force
this way will add to Body.force and Body.angularForce.

Parameters
Name Type Description
force Float32Array | Array

The force vector to add.

worldX number

The world x point to apply the force on.

worldY number

The world y point to apply the force on.

Source code: physics/p2/Body.js (Line 561)
doc_phaser
2017-02-14 11:01:51
Comments
Leave a Comment

Please login to continue.