Finds the Body or Game Object farthest from a source point or object.
If a targets
argument is passed, this method finds the farthest of those.
The targets can be Arcade Physics Game Objects, Dynamic Bodies, or Static Bodies.
If no targets
argument is passed, this method finds the farthest Dynamic Body.
If two or more targets are the exact same distance from the source point, only the first target is returned.
name | type | arguments | description |
---|---|---|---|
source | any |
Any object with public |
|
targets | Array.<Phaser.Physics.Arcade.Body> | Array.<Phaser.Physics.Arcade.StaticBody> | Array.<Phaser.GameObjects.GameObject> | <optional> |
The targets. |
The target farthest from the given source point.