Hello Im trying to apply a rotation to my display object when tapped by this code isnt working. Any suggestions on how to make it work.
local function bubbleTap(event) if event.phase == 'ended' then print(event.target.name) event.target:applyTorque(50) end end local animal = display.newImageRect("assets/images/animals/"..animalName..".png",65,65) physics.addBody(animal, 'kinematic', {radius=43, bounce = 0.0}) animal.x = bubble.x animal.y = \_H animal:setLinearVelocity(0,-80) animal.name = animalName animal.type = "animal" animal:toBack() animal:addEventListener('touch', bubbleTap)