PhysicsForcePosition

Family: 2DPhysics · One form

What it does

PhysicsForcePosition writes to a 2DPhysics object: it sets rather than reads. It takes forceID (an integer), x (a float) and y (a float), and returns nothing. forceID is the id of a Force object, obtained elsewhere in the 2DPhysics family.

Syntax

PhysicsForcePosition(forceID integer, x float, y float)

Parameters

NameType
forceIDinteger
xfloat
yfloat

Every form returns

nothing

Example · generated

force = CreatePhysicsForce(100.0, 120.0, 1.0, 1.0, 1.0, 1)PhysicsForcePosition(force, 100.0, 120.0)DO  Sync()LOOP

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

66 commands in 2DPhysics