I have to be missing something really simple here…
based on the documentation for physics, I believe setLinearVelocity should be used like this:
[lua]local enemyBody = physics.addBody(enemy, “dynamic”, {bounce = 0})
enemyBody:setLinearVelocity( 2, 4 )[/lua]
however, I’m getting runtime errors with line 2. Also getting errors if I try
[lua]enemyBody.angularVelocity = 100[/lua]
any ideas? Oddly enough, the documentation page just jumps from using physics.addBody, to referring to “myBody” without actually showing how “MyBody” is instantiated.
I’m just guessing its myBody = physics.addBody(…) although it doesn’t seem to be addressed directly anywhere [import]uid: 49447 topic_id: 16014 reply_id: 316014[/import]