ObjectSphereCast

Family: 3D · One form

What it does

ObjectSphereCast takes objID (an integer), oldx (a float), oldy (a float), oldz (a float), newx (a float), newy (a float), newz (a float) and radius (a float), and answers an integer. objID is the id of a 3D object, the one LoadObject returned: it is how the call knows what to act on.

Syntax

ObjectSphereCast(objID integer, oldx float, oldy float, oldz float, newx float, newy float, newz float, radius float) → integer

Parameters

NameType
objIDinteger
oldxfloat
oldyfloat
oldzfloat
newxfloat
newyfloat
newzfloat
radiusfloat

Every form returns

integer

Example · generated

object = LoadObject("assets/media.obj")DO  Print(ObjectSphereCast(object, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0))  Sync()LOOP

LoadObject is there to give the call something to act on; ObjectSphereCast is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

286 commands in 3D