This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Load Physics Library | |
local physics = require "physics" | |
--Show physics drawing lines, for help with debugging | |
physics.setDrawMode( "hybrid" ) | |
--Start Physics | |
physics.start() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "physics" | |
display.setStatusBar( display.HiddenStatusBar ) | |
physics.setDrawMode("hybrid") | |
physics.start() | |
physics.setGravity(0, 9.8) | |
physics.setPositionIterations( 10 ) | |
function getGrapplePoint() | |
local point = display.newRect(0, 0, 10, 10) | |
physics.addBody(point,"static", {density = 1, friction = .5, bounce = .1}) |