Distance: Difference between revisions

From Fancade Wiki
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 [[vector]]s.
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 appear like this:
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
Distance.png
TypeScript block
ColliderNone
FolderMath
Ports
Inputs Vector
Vector
Outputs Distance

Outputs the distance between two points.

Example
Example

Example

A notable use case for Distance is picking the closest object.

Trivia

The old Distance script block used to look like this:

Distance_(old).png