B2SETBODYLINEARVELOCITY

This command will set the velocity of the specified object along the X and Y axis.  This can provide an easy way to make a character walk across the floor, or fly into the air.  Unless you continually set the velocity, the body's velocity will slowly decrease and it will eventually come to a stop.  The ID should be the integer handle that was returned when the body was created.

 

Syntax

b2SetBodyLinearVelocity ID as Integer, X as Float, Y as Float

Related Information

BOX2D Commands Menu
Index