What it does
RayCast3DPhysicsObject takes objID (an integer), rayID (an integer), fromVec3ID (an integer), toVec3ID (an integer) and allOrClosest (an integer), 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
RayCast3DPhysicsObject(objID integer, rayID integer, fromVec3ID integer, toVec3ID integer, allOrClosest integer) → integerParameters
| Name | Type |
|---|---|
| objID | integer |
| rayID | integer |
| fromVec3ID | integer |
| toVec3ID | integer |
| allOrClosest | integer |
Every form returns
integer
Example · generated
object = LoadObject("assets/media.obj")ray = Create3DPhysicsRay()DO Print(RayCast3DPhysicsObject(object, ray, 1, 1, 1)) Sync()LOOPLoadObject and Create3DPhysicsRay are there to give the call something to act on; RayCast3DPhysicsObject 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.