I would like to have different physics bodies move in all different directions. Currently I set the gravity and am able to move different bodies with gravity and against gravity using gravityScale. But I would like to have bodies moving along the y and x axis in four different directions instead of just two directions. So if I have 4 objects I would like one moving up, one moving down, one moving right and one moving left. Anyone know the best way to accomplish this?
There are several ways to apply movement to physics objects:
http://docs.coronalabs.com/api/type/Body/setLinearVelocity.html
http://docs.coronalabs.com/api/type/Body/applyLinearImpulse.html
http://docs.coronalabs.com/api/type/Body/applyForce.html
http://docs.coronalabs.com/api/type/Body/applyAngularImpulse.html
Depending on what you want to do.
Rob
Thanks! I figured out what I wanted to do!
There are several ways to apply movement to physics objects:
http://docs.coronalabs.com/api/type/Body/setLinearVelocity.html
http://docs.coronalabs.com/api/type/Body/applyLinearImpulse.html
http://docs.coronalabs.com/api/type/Body/applyForce.html
http://docs.coronalabs.com/api/type/Body/applyAngularImpulse.html
Depending on what you want to do.
Rob
Thanks! I figured out what I wanted to do!