So I’m making a putt putt game and I want the ball to spawn where i click on the screen. I currently have a click listener working called myTouchListener I know its working because I have it print the X and Y coordinates of every click to the corona output screen. How do I
local ball = display.newImage(“ball.png” , {bounce = .3})
ball.x = ((display.contentWidth/2)+62)
ball.y = (80)
ball:scale(.04,.04)
physics.addBody(ball, whiteballdata:get(“ball”))
Thats my code for the ball, and I want the ball.x and ball.y to spawn the ball at the click, how do i do this?
Thanks!