Hi everyone,
I have not seen a solution to this, but lets take the falling craters box on the ground.
Is there a way to see with how much force it hit the ground ? Lets say I make one box start at top of screen and one at center of screen, they would hit the ground with a different force. This should be available as this is clearly demonstratable with this code below. The rect1 jumps higher than rect2
[lua]H = display.contentHeight
W = display.contentWidth
local physics = require(“physics”)
local rect1 = display.newRect(20,10,50,50)
local rect2 = display.newRect(W/2, H/2, 50, 50)
local floor = display.newRect(0,H-20, 320, 20)
local leftWall = display.newRect(0,0,10,H)
local rightWall = display.newRect(W-10,0,10,H)
local function start()
physics.start()
physics.addBody(floor, “static”, {density=2, bounce=0.2})
physics.addBody(rect1, {denisty=2, bounce=0.3})
physics.addBody(rect2, {denisty=2, bounce=0.3})
end
start()[/lua] [import]uid: 61610 topic_id: 10334 reply_id: 310334[/import]