The value that return form event.force is wrong -*-
It’s a static value since it’s shouldn’t
Check my example out and see by yourself
local physics = require(“physics”)
physics.start()
triggerRect = display.newRoundedRect(0 , 400, 300, 1, 0 )
physics.addBody(triggerRect, “static”, {friction=1, bounce=0, density=1})
local demoCube = display.newRoundedRect(228, 50, 40, 40, 0 )
physics.addBody(demoCube, {friction=1, bounce=0.9, density=0.1})
demoCube.isFixedRotation = true
local function onPostCollision( event )
if ( event.force > 0.3) then
print(event.force)
end
end
Runtime:addEventListener( “postCollision”, onPostCollision )
It’s so critical to my project because we have to use this feature T_T
Help me plz T_T [import]uid: 43010 topic_id: 7639 reply_id: 307639[/import]