worldAngleToPointer(displayObject, pointer) → {number}
Find the angle in radians between a display object (like a Sprite) and a Pointer,
taking their x/y and center into account relative to the world.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
displayObject | any | The DisplayObjerct to test from. | |
pointer | Phaser.Pointer | <optional> | The Phaser.Pointer to test to. If none is given then Input.activePointer is used. |
Returns
number -
The angle in radians between displayObject.world.x/y to Pointer.worldX / worldY
- Source code: physics/arcade/World.js (Line 2099)
Please login to continue.