Homeworld Effects Manual: setVelLOFDist()

setVelLOFDist(float value)

value can be an integer constant, a floating-point constant, or a floating-point variable. Using an integer variable will not cause a crash, but has the same effect as setVelLOFDist(0), which is not very useful.

Homeworld effects use cylindrical co-ordinates. LOF (Line Of Fire, as near as I can tell) corresponds to the Z axis. Think of a clock face. The Z-axis comes straight out of the clock towards you. setVelLOF() gives an uncertainty of value meters per second to an object's speed in the Z direction. Most of the time, setVelLOFDist() is used in conjuction with setVelLOF(), and the two do not contradict each other. setVelLOFDist() is applied on top of whatever setVelLOF() is set to. The following code sample creates 10 circles, with speeds ranging from 100 to 300 meters per second.

setDefaults()
setScale(10)
setVelLOF(200)
setVelLOFDist(100)
createCircles(10,0)