Physics.Arcade#worldAngleToPointer()

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)
doc_phaser
2017-02-14 10:59:12
Comments
Leave a Comment

Please login to continue.