Hi guys,
I am just learning the tap event and physics. I have an object on the screen in static mode. I want to tap on it and it falls down (that is the bodyType should become dynamic ). why my code is not working?
local physics = require('physics') physics.start() center\_x = display.contentCenterX center\_y = display.contentCenterY bird = display.newImageRect('bird.png', 101, 171) bird.x = center\_x bird.y = center\_y physics.addBody(bird, "static") function screen\_touched(event) bird.BodyType = "dynamic" end bird:addEventListener('tap', screen\_touched)
Thank you so much
Andy