Available since Version 1.0.
Checks if a point is inside a sphere.
Syntax
Engine.VectorUtil.InSphere( point, sphereCenter, sphereRadius )Arguments
- point (Vector3): The point to check.
- sphereCenter (Vector3): The center of the sphere.
- sphereRadius (number): The radius of the sphere.
Return Values
- (boolean): True if the point is inside the sphere, false otherwise.
Examples
local point = Engine.Vector3(1, 2, 3)
local sphereCenter = Engine.Vector3(4, 5, 6)
local sphereRadius = 5
local inSphere = Engine.VectorUtil.InSphere(point, sphereCenter, sphereRadius)