Methods
-
Blockly.JavaScript['physics_closest'](block)
-
Parameters:
Name Type Description block
Code Equivalent:
undefined
-
Blockly.JavaScript['physics_farthest'](block)
-
Parameters:
Name Type Description block
Code Equivalent:
undefined
-
physics_distance_between(source, target)
-
Returns the distance between the two objects, based on their x/y coordinates.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description source
object to check from
target
object to check to
Code Equivalent:
game.physics.arcade.distanceBetween(source, target)
-
physics_distance_to_location(object, x, y)
-
Returns the distance between an object and an x/y location in the game.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description object
object to check from
x
Number x location to check
y
Number y location to check
Code Equivalent:
game.physics.arcade.distanceToXY(object, x, y)
-
physics_distance_to_pointer(source, pointer)
-
Returns the distance between an object and the mouse pointer.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description source
object to check from
pointer
mouse pointer to check to
Code Equivalent:
game.physics.arcade.distanceToPointer(source, pointer)