Hi there!
I’ve been experimenting with graphics.newOutline and it works quite well, one issue I get though is when the anchor point of the actual image is different than the default. No matter what I do here the outline will not follow and rather stick where it would if the image anchor points would be default. [EDIT] I’m using the 2014.2176 daily build.
The code used in picture_1:
local fgFile = "img/lvl\_a.png" local foregroundOutline = graphics.newOutline( 2, fgFile) local foreground = display.newImage(fgFile) foreground.x = cw\*0.5; foreground.y = ch physics.addBody ( foreground, "kinematic", { outline=foregroundOutline, friction=0.3} )
The code used in picture_2:
local fgFile = "img/lvl\_a.png" local foregroundOutline = graphics.newOutline( 2, fgFile) local foreground = display.newImage(fgFile) foreground.anchorY = 1; foreground.x = cw\*0.5; foreground.y = ch physics.addBody ( foreground, "kinematic", { outline=foregroundOutline, friction=0.3} )
I tried adding an anchor point to the outline aswell, but to no avail obviously as it’s not supposed to work that way. I suppose this is a bug, should I file a report on it?