What it does
Object3DPhysicsLinearVelocity writes to a 3DPhysics object: it sets rather than reads. It takes objID (an integer), dirX (a float), dirY (a float), dirZ (a float) and initialSpeed (a float), 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
Object3DPhysicsLinearVelocity(objID integer, dirX float, dirY float, dirZ float, initialSpeed float)2
Object3DPhysicsLinearVelocity(objID integer, vectorID integer, initialSpeed float)Parameters
| Name | Type | In forms |
|---|---|---|
| objID | integer | all |
| dirX | float | 1 |
| dirY | float | 1 |
| dirZ | float | 1 |
| initialSpeed | float | all |
| vectorID | integer | 2 |
Every form returns
nothing
Example · generated
Form 1, with every argument
object = LoadObject("assets/media.obj")Object3DPhysicsLinearVelocity(object, 1.0, 1.0, 1.0, 1.0)DO Sync()LOOPForm 2, the short one
object = LoadObject("assets/media.obj")Object3DPhysicsLinearVelocity(object, 1, 1.0)DO Sync()LOOPLoadObject is there to give the call something to act on; Object3DPhysicsLinearVelocity 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.