Apply a force to a body based on the given angle and speed. If no angle is given, the current body angle is used.
Use very small speed values, such as 0.1, depending on the mass and required velocity.
name | type | arguments | description |
---|---|---|---|
bodies | Phaser.Types.Physics.Matter.MatterBody | Array.<Phaser.Types.Physics.Matter.MatterBody> |
Either a single Body, or an array of bodies to update. If falsey it will use all bodies in the world. |
|
speed | number |
A speed value to be applied to a directional force. |
|
angle | number | <optional> |
The angle, in radians, to apply the force from. Leave undefined to use the current body angle. |
This Matter Physics instance.