Shouldn’t this handle point coordinate conversions, even when display objects/groups are scaled? It isn’t working when groups are scaled.
function globalToLocal( point, target )
local X = point.x
local Y = point.y
local scaleX = 1
local scaleY = 1
while target.parent do
scaleX = scaleX + ( target.xScale - 1 )
scaleY = scaleY + ( target.yScale - 1 )
X = X + ( target.x * scaleX )
Y = Y + ( target.y * scaleY )
target = target.parent
end
return { x=X, y=Y }
end
[import]uid: 4596 topic_id: 8377 reply_id: 308377[/import]