Touching strange shaped objects

No I’m not talking about my man bits.

I am drawing some non-standard shaped objects to the screen (polylines i believe), and I cant seem to fill them in order to make them react to touches. I am new around here and have only been using corona a wee while. I traced out some Flash vectors in order to get a complex path drawn easily.

The setFillColor() function bellow throws an error…maybe it is simply not possible yet and I will have to resort to various rectangles etc.

[code]
local shape1 = display.newLine(-96.9,-270.4,-89.85,-272.95)

–shape1:setFillColor( 200, 200, 200, 255)
shape1:setColor( 50, 160, 50, 255)
shape1:append(-82.7,-275.3,…)
shape1.width = 5
shape1.isHitTestable = true
_customGroup:insert(shape1)
_customGroup.x = 320
_customGroup.y = 240

function _customGroup:touch(event)
print(“TOUCHBIT”)
end
_customGroup:addEventListener(“touch”,_customGroup)
[/code] [import]uid: 40116 topic_id: 12332 reply_id: 312332[/import]

your object shape1 is a line lines doesn’t have Fill Color try using setStrokeColor.
[import]uid: 71210 topic_id: 12332 reply_id: 45358[/import]

Thats the problem i am afraid. I need to make the object selectable within its boundaries. This shape is NOT a square or a circle, it s a custom made shape with many corners. I may have to look into seeing how box2d deals with this sort of thing as correct me if im wrong but i dont think the standard library’s can handle selecting any shape other than a square or circle. [import]uid: 40116 topic_id: 12332 reply_id: 45559[/import]

are your shapes too big or will you be having too many shapes to be filled ?

if its small you may try coloring it at pixel level. [import]uid: 71210 topic_id: 12332 reply_id: 45562[/import]