Hi,
I have noticed that physics.addBody gives me different results depends on first argument i.e. rect interact only with platform object. Why?
--main.lua local physics = require( "physics" ) physics.start() physics.setDrawMode( "hybrid" ) local \_T = display.screenOriginY local \_B = display.viewableContentHeight - display.screenOriginY local \_L = display.screenOriginX local \_R = display.viewableContentWidth - display.screenOriginX local \_CX = display.contentCenterX local \_CY = display.contentCenterY local platform = display.newImageRect( "platform.png", 300, 50 ) platform.x = \_CX platform.y = \_B-25 local rect = display.newRect( 200, 100, 100, 300 ) local bottomWall = display.newRect( \_CX, \_B- 120, \_L - \_R, 20 ) physics.addBody( platform, "static" ) physics.addBody( rect, 'dynamic', { bounce=0.3 } ) physics.addBody( bottomWall, "static" )
GIF:
Image comes from Chapter 1 — Creating an App.
I use Corona Simulator v. 2017.3184 on Win7 64-bit.
ldurniat