I’m trying to wrap my mind around the potential of the accelerometer. I have created a scene that contains a moving body object and a static body object. When the moving body collides the the static body, I want the moving body to remove itself and a new moving body to be added to the scene. Everything works except adding a new moving body. The most I can do is make a moving body visible or invisible. Am I asking too much from the accelerometer? Here’s a sample of what I’ve managed to get working.
[code]
local function onCollision (event)
if(event.other.name == ‘notch1’)then
shTileFin.isVisible = true;
shTile:removeSelf()
shTile=nil;
tile2.isVisible = true;
–I can’t get anything with physics to happen here
end
end [import]uid: 48122 topic_id: 8708 reply_id: 308708[/import]
