Reference Verse

Distance(A, B) measures how far apart two vector3 positions are — check if a pla

Updated
The code on this reference page is provided as-is and did not pass the latest compile check — treat the examples as a starting point and verify in your project.

Distance(A, B) tells you how far apart two points are.

Objective : vector3 = vector3{X := 0.0, Y := 0.0, Z := 0.0}
Players := GetPlayspace().GetPlayers()
for (P : Players, C := P.GetFortCharacter[]):
    Here := C.GetViewLocation()
    if (Distance(Here, Objective) < 500.0):
        Print("Player reached the objective!")

Takeaway — Distance = one number for 'how far apart'.

Guides & scripts that use vector_distance

Step-by-step tutorials that put this object to work.

Build your own lesson with vector_distance

Generate a personalized, step-by-step lesson plan built around this object — grounded in this exact reference and our compile-verified knowledge base.

Build a lesson →