I have to be missing something really simple here...
based on the documentation for physics, I believe setLinearVelocity should be used like this:
1 2 | local enemyBody = physics.addBody(enemy, "dynamic", {bounce = 0}) enemyBody:setLinearVelocity( 2, 4 ) |
Try something like this...
1 2 3 4 | local enemyBody = display.newImageRect( "enemy.png", imgWidth, imgHeight ) physics.addBody(enemyBody, "dynamic", {bounce = 0}) enemyBody:setLinearVelocity( 2, 4 ) enemyBody.angularVelocity = 100 |
thanks, I didn't realize that an imageRect (or in my case, a sprite) was the body just by calling physics.addBody on it.
Wish I would have posted this first, instead of trying a few different daily builds (assuming it was an issue with corona)! lol.
views:1267 update:2011/10/18 8:54:01