Using code to integrating a polyline physics body into a layer... possible?

I am very new to lime and to the use of maps in general.
Nonetheless lime has enabled me to draw, display and generate a physical map. Whoo-hooo!!! Now my only challenge is that I would like to imlpement a polyline based physics object that interacts with a physics body (player) that is spawned on the map. Is this possible? To be more clear I have the Map and supporting code to spawn a player. I also have the code to generate and make physical a polyline between two points touched by a user. The problem is that the physical polyline won’t interact with the physical player… I assume because of a layering issue. Is there any way to associate the polyline with a layer on the map via code?

Thanks so much!
Tim [import]uid: 16901 topic_id: 9712 reply_id: 309712[/import]

I’m on my phone so sorry for the short reply. Try something like this:

[code]

local layer = map:getTileLayer( “layerName” )

layer:addObject( physicsObject )

[/code] [import]uid: 5833 topic_id: 9712 reply_id: 35379[/import]

That worked! Thanks so much! [import]uid: 16901 topic_id: 9712 reply_id: 35469[/import]

Awesome, glad it did! [import]uid: 5833 topic_id: 9712 reply_id: 35486[/import]