Distance: Difference between revisions
| -u ndefined- (talk | contribs) m (Add an example usage for the block) |  (Improve wording) Tags: Mobile edit Mobile web edit Advanced mobile edit | ||
| Line 7: | Line 7: | ||
| |output1={{Port|n|Distance}} | |output1={{Port|n|Distance}} | ||
| }} | }} | ||
| Outputs the distance between two [[ | Outputs the distance between two [[Vector|points]]. | ||
| [[File:Distance example.jpg|frameless|center|Example]] | [[File:Distance example.jpg|frameless|center|Example]] | ||
| Line 17: | Line 17: | ||
| == Trivia == | == Trivia == | ||
| The old Distance script block used to  | The old Distance script block used to look like this: | ||
| {{Image|Distance_(old).png}} | {{Image|Distance_(old).png}} | ||
| [[Category:Blocks]] | [[Category:Blocks]] | ||
Latest revision as of 01:25, 23 August 2025
Distance
  | Type | Script block | 
| Collider | None | 
| Folder | Math | 
| Ports | |
|---|---|
| Inputs | Vector Vector | 
| Outputs | Distance | 
Outputs the distance between two points.

Example
A notable use case for Distance is picking the closest object.
Trivia
The old Distance script block used to look like this:

 
	