It looks like you're new here. If you want to get involved, click one of these buttons!
Millerszone
Member
local physics = require( "physics" ) physics.start() local sky = display.newImage( "bkg_clouds.png" ) sky.x = 160; sky.y = 195 local ground = display.newImage( "ground.png" ) ground.x = 160; ground.y = 445 physics.addBody( ground, "static", { friction=0.5, bounce=0.3 } ) local crate = display.newImage( "crate.png" ) crate.x = 180; crate.y = -50; crate.rotation = 5 physics.addBody( crate, { density=3.0, friction=0.5, bounce=0.3 } ) |
Comments
Currently, we have two goals about physics. First, we want to bind all functions of Box2D to Lua. And second we will put an extra layer on top of that for easy physics programming. We want to allow programmers to choose between direct Box2D API or easy physics API.
Thank you
If your game has a lot going on, then you can use direct Box2D for speed, or if your game is
simple, then you can choose layered Box2D.
I'm going to take a break this weekend, so no questions for a couple of days.
http://www.sharksoupstudios.com