Vector3.Distance||doc136382

September 20, 2022

Format

Vector3.Distance(vec1, vec2)

Describe

Calculate the distance between two vectors. It can be used to judge some conditions. For example, if the enemy has a certain field of vision, no player can be seen beyond 30 meters.

parameter

Variable name Type Describe
vec1 Vector3 Vector 1
vec2 Vector3 Vector 2

Return value

Type Describe
float distance