It’s so critical to my project because we have to use this feature T_T
Help me plz T_T
The value that return form event.force is wrong -*-
It’s a fake value since it’s shouldn’t
Check my example out and see by yourself
If we change isFixedRotation to false, There would be no problem but for my project I have to set it fixedRotation T_T
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 onLocalPostCollision( self, event )
print( event.force )
end
demoCube.postCollision = onLocalPostCollision
demoCube:addEventListener( “postCollision”, demoCube )
[import]uid: 43010 topic_id: 7655 reply_id: 307655[/import]