hi, i have and object and with a touch event i can apply a linear impulse but i don’t know exactly on which direction and power is shoot… help
please
[lua]function shoot(event)
if (event.phase == “began”) then
display.getCurrentStage():setFocus(player)
–shotArrow.isVisible = true
elseif (event.phase == “ended”)then
player:applyLinearImpulse(event.xStart - event.x, event.yStart - event.y)
display.getCurrentStage():setFocus(nil)
end
end
player:addEventListener (“touch”, shoot) [import]uid: 138440 topic_id: 24713 reply_id: 324713[/import]