ObjectRayCast

Family: 3D · One form

What it does

ObjectRayCast takes objID (an integer), oldx (a float), oldy (a float), oldz (a float), newx (a float), newy (a float) and newz (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

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

Parameters

NameType
objIDinteger
oldxfloat
oldyfloat
oldzfloat
newxfloat
newyfloat
newzfloat

Every form returns

integer

Example · generated

object = LoadObject("assets/media.obj")DO  Print(ObjectRayCast(object, 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; ObjectRayCast 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