Methods
-
Blockly.JavaScript['physics_closest'](block)
-
Parameters:
Name Type Description blockCode Equivalent:
undefined -
Blockly.JavaScript['physics_farthest'](block)
-
Parameters:
Name Type Description blockCode 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 sourceobject to check from
targetobject 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 objectobject to check from
xNumber x location to check
yNumber 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 sourceobject to check from
pointermouse pointer to check to
Code Equivalent:
game.physics.arcade.distanceToPointer(source, pointer)