What I am trying to do is when two object hit at a certain force and are of a certain type that I assign, then it will removeSelf()
I am extending an image by adding image.type = “whatever”
How do you get the instances of both object that are collided???
event.object1:removeSelf() ???
[code]
local function onPostCollision( event )
if ( event.force > 6.0 ) then
print( "Collision force: " … event.force … " Friction: " … event.friction )
if event.object1.type == “ball” then
event.object1:removeSelf()
end
end
end
Runtime:addEventListener( “postCollision”, onPostCollision )
[/code] [import]uid: 7197 topic_id: 5735 reply_id: 305735[/import]