is there any way to implement a power limitation using the code from the pool game example? I have written a function to find the distance of the touch from the cue ball, but I can’t think of a way to use it:
local function getDistance(sx,sy,tx,ty)
local xDiff = math.sqrt((sx-tx)^2)
local yDiff = math.sqrt((sy-ty)^2)
return math.sqrt((xDiff^2)+(yDiff^2))
end [import]uid: 116264 topic_id: 30421 reply_id: 330421[/import]
[import]uid: 21331 topic_id: 30421 reply_id: 121966[/import]