I am sorry if this question has already been addressed. I could not find a solution.
Basically i would like to shrink a body on collision
My code…
local function onCollision( event )
local Phase = event.phase
if (“began” == Phase) then
event.object2.radius = event.object2.radius * 0.5
end
end
It fails because it says radius is a nill value. I am guessing I do not have access to the property.
Has anyone fixed this? I considered removing and creating a new body on collision but that feels yucky.
[import]uid: 43228 topic_id: 8088 reply_id: 308088[/import]