ObjectShapeSphere

Family: 3DPhysics · 2 forms

What it does

ObjectShapeSphere writes to a 3DPhysics object: it sets rather than reads. It takes objID (an integer), and returns nothing. That is the first of 2 forms. objID is the id of a 3D object, the one LoadObject returned: it is how the call knows what to act on.

Syntax

1
ObjectShapeSphere(objID integer)
2
ObjectShapeSphere(objID integer, diameter float)

Parameters

NameTypeIn forms
objIDintegerall
diameterfloat2

Every form returns

nothing

Example · generated

Form 1, the short one

object = LoadObject("assets/media.obj")ObjectShapeSphere(object)DO  Sync()LOOP

Form 2, with every argument

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

LoadObject is there to give the call something to act on; ObjectShapeSphere 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.

144 commands in 3DPhysics